Class QPropertyDefinitionBuilder
java.lang.Object
org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
org.apache.jackrabbit.spi.commons.nodetype.QPropertyDefinitionBuilder
A builder for
QPropertyDefinition.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultValue(QValue value) Adds a default value of the property definition being built.voidaddValueConstraint(QValueConstraint constraint) Adds a value constraint of the property definition being built.build()Creates a newQPropertyDefinitioninstance based on the state of this builder.String[]QValue[]booleanbooleanbooleanintvoidsetAvailableQueryOperators(String[] queryOperators) voidsetDefaultValues(QValue[] values) voidsetFullTextSearchable(boolean fullTextSearchable) voidsetMultiple(boolean isMultiple) voidsetQueryOrderable(boolean queryOrderable) voidsetRequiredType(int type) voidsetValueConstraints(QValueConstraint[] constraints) Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.QItemDefinitionBuilder
getAutoCreated, getDeclaringNodeType, getMandatory, getName, getOnParentVersion, getProtected, setAutoCreated, setDeclaringNodeType, setMandatory, setName, setOnParentVersion, setProtected
-
Constructor Details
-
QPropertyDefinitionBuilder
public QPropertyDefinitionBuilder()
-
-
Method Details
-
setRequiredType
public void setRequiredType(int type) - Parameters:
type- the required type of the property definition being built.- See Also:
-
getRequiredType
public int getRequiredType()- Returns:
- the required type of the property definition being built.
- See Also:
-
addValueConstraint
Adds a value constraint of the property definition being built.- Parameters:
constraint- the constraint.
-
setValueConstraints
- Parameters:
constraints- array of value constraints of the property definition being built.- See Also:
-
getValueConstraints
- Returns:
- array of value constraints of the property definition being built.
- See Also:
-
addDefaultValue
Adds a default value of the property definition being built.- Parameters:
value- a default value.
-
setDefaultValues
- Parameters:
values- array of default values of the property definition being built.- See Also:
-
getDefaultValues
- Returns:
- array of default values of the property definition being built or
nullif no default values are defined. - See Also:
-
setMultiple
public void setMultiple(boolean isMultiple) - Parameters:
isMultiple- true if building a 'multiple' property definition.- See Also:
-
getMultiple
public boolean getMultiple()- Returns:
- true if building a 'multiple' property definition.
- See Also:
-
getFullTextSearchable
public boolean getFullTextSearchable()- Returns:
trueif the property is fulltext searchable- See Also:
-
setFullTextSearchable
public void setFullTextSearchable(boolean fullTextSearchable) - Parameters:
fullTextSearchable-trueif building a 'fulltext searchable' property definition- See Also:
-
getQueryOrderable
public boolean getQueryOrderable()- Returns:
trueif the property is orderable in a query- See Also:
-
setQueryOrderable
public void setQueryOrderable(boolean queryOrderable) - Parameters:
queryOrderable-trueif the property is orderable in a query- See Also:
-
getAvailableQueryOperators
- Returns:
- the query operators of the property
- See Also:
-
setAvailableQueryOperators
- Parameters:
queryOperators- the query operators of the property- See Also:
-
build
Creates a newQPropertyDefinitioninstance based on the state of this builder.- Returns:
- a new
QPropertyDefinitioninstance. - Throws:
IllegalStateException- if the instance has not the necessary information to build the QPropertyDefinition instance.
-