/** * @see javax.jcr.nodetype.PropertyDefinition#isQueryOrderable() */ public boolean isQueryOrderable() { return ((QPropertyDefinition) itemDef).isQueryOrderable(); } }
/** * @see javax.jcr.nodetype.PropertyDefinition#isQueryOrderable() */ public boolean isQueryOrderable() { return ((QPropertyDefinition) itemDef).isQueryOrderable(); } }
/** * Compares two property definitions for equality. Returns <code>true</code> * if the given object is a property definition and has the same attributes * as this property definition. * * @param obj the object to compare this property definition with * @return <code>true</code> if the object is equal to this property definition, * <code>false</code> otherwise * @see Object#equals(Object) */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof QPropertyDefinition) { QPropertyDefinition other = (QPropertyDefinition) obj; return super.equals(obj) && requiredType == other.getRequiredType() && multiple == other.isMultiple() && fullTextSearchable == other.isFullTextSearchable() && queryOrderable == other.isQueryOrderable() && ((valueConstraints == null || other.getValueConstraints() == null) ? (valueConstraints == other.getValueConstraints()) : new HashSet(Arrays.asList(valueConstraints)).equals(new HashSet(Arrays.asList(other.getValueConstraints())))) && ((defaultValues == null || other.getDefaultValues() == null) ? (defaultValues == other.getDefaultValues()) : new HashSet(Arrays.asList(defaultValues)).equals(new HashSet(Arrays.asList(other.getDefaultValues())))) && new HashSet(Arrays.asList(availableQueryOperators)).equals(new HashSet(Arrays.asList(other.getAvailableQueryOperators()))); } return false; }
/** * Compares two property definitions for equality. Returns <code>true</code> * if the given object is a property definition and has the same attributes * as this property definition. * * @param obj the object to compare this property definition with * @return <code>true</code> if the object is equal to this property definition, * <code>false</code> otherwise * @see Object#equals(Object) */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof QPropertyDefinition) { QPropertyDefinition other = (QPropertyDefinition) obj; return super.equals(obj) && requiredType == other.getRequiredType() && multiple == other.isMultiple() && fullTextSearchable == other.isFullTextSearchable() && queryOrderable == other.isQueryOrderable() && ((valueConstraints == null || other.getValueConstraints() == null) ? (valueConstraints == other.getValueConstraints()) : new HashSet(Arrays.asList(valueConstraints)).equals(new HashSet(Arrays.asList(other.getValueConstraints())))) && ((defaultValues == null || other.getDefaultValues() == null) ? (defaultValues == other.getDefaultValues()) : new HashSet(Arrays.asList(defaultValues)).equals(new HashSet(Arrays.asList(other.getDefaultValues())))) && new HashSet(Arrays.asList(availableQueryOperators)).equals(new HashSet(Arrays.asList(other.getAvailableQueryOperators()))); } return false; }
Constants.ISFULLTEXTSEARCHABLE_ATTRIBUTE, def.isFullTextSearchable()); builder.setAttribute( Constants.ISQUERYORDERABLE_ATTRIBUTE, def.isQueryOrderable());
Constants.ISFULLTEXTSEARCHABLE_ATTRIBUTE, def.isFullTextSearchable()); builder.setAttribute( Constants.ISQUERYORDERABLE_ATTRIBUTE, def.isQueryOrderable());
/** * Copy constructor. * * @param propDef some other property definition. */ public QPropertyDefinitionImpl(QPropertyDefinition propDef) { this(propDef.getName(), propDef.getDeclaringNodeType(), propDef.isAutoCreated(), propDef.isMandatory(), propDef.getOnParentVersion(), propDef.isProtected(), propDef.getDefaultValues(), propDef.isMultiple(), propDef.getRequiredType(), propDef.getValueConstraints(), propDef.getAvailableQueryOperators(), propDef.isFullTextSearchable(), propDef.isQueryOrderable()); }
/** * Copy constructor. * * @param propDef some other property definition. */ public QPropertyDefinitionImpl(QPropertyDefinition propDef) { this(propDef.getName(), propDef.getDeclaringNodeType(), propDef.isAutoCreated(), propDef.isMandatory(), propDef.getOnParentVersion(), propDef.isProtected(), propDef.getDefaultValues(), propDef.isMultiple(), propDef.getRequiredType(), propDef.getValueConstraints(), propDef.getAvailableQueryOperators(), propDef.isFullTextSearchable(), propDef.isQueryOrderable()); }
/** * Create a new JCR property definition from the given <code>QPropertyDefinition</code>. * * @param qPd A SPI property definition. * @return the corresponding JCR property definition. * @throws RepositoryException if an error occurs. */ public PropertyDefinition create(QPropertyDefinition qPd) throws RepositoryException { PropertyDefinitionTemplate pt = ntMgr.createPropertyDefinitionTemplate(); pt.setName(getJCRName(qPd.getName())); pt.setAutoCreated(qPd.isAutoCreated()); pt.setMandatory(qPd.isMandatory()); pt.setOnParentVersion(qPd.getOnParentVersion()); pt.setProtected(qPd.isProtected()); pt.setRequiredType(qPd.getRequiredType()); pt.setMultiple(qPd.isMultiple()); pt.setFullTextSearchable(qPd.isFullTextSearchable()); pt.setValueConstraints(createValueConstraints(qPd.getRequiredType(), qPd.getValueConstraints())); pt.setAvailableQueryOperators(qPd.getAvailableQueryOperators()); pt.setQueryOrderable(qPd.isQueryOrderable()); pt.setDefaultValues(createValues(qPd.getDefaultValues())); return pt; }
/** * Create a new JCR property definition from the given <code>QPropertyDefinition</code>. * * @param qPd A SPI property definition. * @return the corresponding JCR property definition. * @throws RepositoryException if an error occurs. */ public PropertyDefinition create(QPropertyDefinition qPd) throws RepositoryException { PropertyDefinitionTemplate pt = ntMgr.createPropertyDefinitionTemplate(); pt.setName(getJCRName(qPd.getName())); pt.setAutoCreated(qPd.isAutoCreated()); pt.setMandatory(qPd.isMandatory()); pt.setOnParentVersion(qPd.getOnParentVersion()); pt.setProtected(qPd.isProtected()); pt.setRequiredType(qPd.getRequiredType()); pt.setMultiple(qPd.isMultiple()); pt.setFullTextSearchable(qPd.isFullTextSearchable()); pt.setValueConstraints(createValueConstraints(qPd.getRequiredType(), qPd.getValueConstraints())); pt.setAvailableQueryOperators(qPd.getAvailableQueryOperators()); pt.setQueryOrderable(qPd.isQueryOrderable()); pt.setDefaultValues(createValues(qPd.getDefaultValues())); return pt; }
tmpl.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());
tmpl.setAvailableQueryOperators(def.getAvailableQueryOperators()); tmpl.setFullTextSearchable(def.isFullTextSearchable()); tmpl.setQueryOrderable(def.isQueryOrderable());