public abstract class OwStandardDecoratorSearchCriteria extends OwSearchCriteria
OwSearchCriteria wrapper to implement a decorator pattern.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
ATTRIBUTE_ALLOWWILDCARD, ATTRIBUTE_HIDDEN, ATTRIBUTE_IGNORE_DATE, ATTRIBUTE_IGNORE_TIME, ATTRIBUTE_NONE, ATTRIBUTE_READONLY, ATTRIBUTE_REQUIRED, m_FieldDefinition, m_iAttributes, m_iOp, m_oDefaultValue, m_oValue, m_secondrangecriteria, m_strInstruction, m_strUniqueName, m_wildcarddefinitions
Constructor and Description |
---|
OwStandardDecoratorSearchCriteria() |
Modifier and Type | Method and Description |
---|---|
boolean |
canWildCard()
check if criteria allows the use of wildcards
|
int |
getAttributes()
get the flag indicating if the criteria can be edited in a search template view or if it is hidden
|
String |
getClassName()
get the name of the class
|
Object |
getDefaultValue()
get the default search value
|
String |
getDescription(Locale locale_p)
get the description defined by the DMS System
|
String |
getDisplayName(Locale locale_p)
get the displayable name of the type as defined by the DMS System
can be identical to getClassName
|
OwEnumCollection |
getEnums()
get a list of enum objects for the enum type (see isEnum)
|
OwFieldDefinition |
getFieldDefinition()
get the corresponding field definition of the field
|
OwFormat |
getFormat()
get the formatter object for string representation
|
String |
getInstruction()
get the instruction to the search criteria
|
String |
getJavaClassName()
get the java class name of java object associated with this property
|
Object |
getMaxValue()
get the max allowed value, or Integer len for String or null if not defined
|
Object |
getMinValue()
get the min allowed value, or Integer len for String or null if not defined
|
Object |
getNativeType()
get the native type which is defined by the underlying system
WARNING: The returned object is opaque.
|
Node |
getNodeFromValue(Object value_p,
Document doc_p)
create a XML serialization of the given field value
|
int |
getOperator()
get the criteria operator which should be applied to the value as defined in OwSearchCriteria
|
String |
getOperatorDisplayName(Locale locale_p)
convert a operator ID to a displayable name
|
Collection |
getOperators()
get a collection of possible filter / search operators for the field
|
String |
getOriginalJavaClassName()
get the original class name, in case data type was overridden by allow wildcard
|
OwSearchCriteria |
getSecondRangeCriteria()
get a optional second child criteria for range searches
|
Format |
getTextFormat(int fieldProviderType_p)
get the optional formatter object for string representation, according to the given context type
|
String |
getUniqueName()
get a unique name that identifies this criteria
|
Object |
getValue()
get the compare value for the search
|
Object |
getValueFromNode(Node node_p)
create a value for the field described by this class with the given XML Node serialization
|
Object |
getValueFromString(String text_p)
create a value for the field described by this class with the given String serialization
|
Collection |
getWildCardDefinitions()
get the wildcard definitions for this criteria
|
abstract OwSearchCriteria |
getWrappedCriteria()
get the decorated object, to be implemented be overridden classes
|
boolean |
ignoreTime()
check if the format should ignore time part of date values
|
boolean |
isAllowWildcard()
check if the criteria allows wildcard even if underlying type is number
|
boolean |
isArray()
check if property contains a list of values
|
boolean |
isCriteriaOperatorRange()
check if criteria has a second range criteria fo ranges
|
boolean |
isDateType()
check if criteria is a date criteria
|
boolean |
isEnum()
check if property is a enum type (see getEnums)
|
boolean |
isHidden()
check if the criteria can be edited in a search template view or if it is hidden
|
boolean |
isIgnoreTime()
check if the criteria ignores the time part
|
boolean |
isReadonly()
check if the criteria is visible but read-only
|
boolean |
isRequired()
check if the criteria must be set
|
boolean |
isType(Class base_p)
check if given java class name is base type
|
void |
setInitialAndDefaultValue(Object value_p)
set the initial/default value for the search
|
void |
setOperator(int op_p)
set the criteria operator which should be applied to the value as defined in OwSearchCriteria
|
void |
setValue(Object value_p)
set the compare value for the search
|
void |
setWildCardDefinitions(Collection wildcarddefinitions_p)
set the wildcard definitions for this criteria
|
canValidate, getComplexChildClasses, ignoreDate, isComplex, isIgnoreDate, toString, validate
public abstract OwSearchCriteria getWrappedCriteria()
public boolean canWildCard()
OwSearchCriteria
canWildCard
in class OwSearchCriteria
public int getAttributes()
OwSearchCriteria
getAttributes
in class OwSearchCriteria
public String getClassName()
OwFieldDefinition
getClassName
in interface OwFieldDefinition
getClassName
in class OwSearchCriteria
public Object getDefaultValue() throws Exception
OwSearchCriteria
getDefaultValue
in interface OwFieldDefinition
getDefaultValue
in class OwSearchCriteria
Exception
public String getDescription(Locale locale_p)
OwFieldDefinition
getDescription
in interface OwFieldDefinition
getDescription
in class OwSearchCriteria
locale_p
- Locale to usepublic String getDisplayName(Locale locale_p)
OwFieldDefinition
getDisplayName
in interface OwFieldDefinition
getDisplayName
in class OwSearchCriteria
locale_p
- Locale to usepublic OwEnumCollection getEnums() throws Exception
OwFieldDefinition
getEnums
in interface OwFieldDefinition
getEnums
in class OwSearchCriteria
Exception
public OwFieldDefinition getFieldDefinition() throws Exception
OwSearchCriteria
getFieldDefinition
in interface OwField
getFieldDefinition
in class OwSearchCriteria
Exception
public OwFormat getFormat()
OwSearchCriteria
getFormat
in interface OwFieldDefinition
getFormat
in class OwSearchCriteria
public String getInstruction()
OwSearchCriteria
getInstruction
in class OwSearchCriteria
public String getJavaClassName()
OwFieldDefinition
getJavaClassName
in interface OwFieldDefinition
getJavaClassName
in class OwSearchCriteria
public Object getMaxValue() throws Exception
OwFieldDefinition
getMaxValue
in interface OwFieldDefinition
getMaxValue
in class OwSearchCriteria
Exception
public Object getMinValue() throws Exception
OwFieldDefinition
getMinValue
in interface OwFieldDefinition
getMinValue
in class OwSearchCriteria
Exception
public Object getNativeType() throws Exception
OwFieldDefinition
getNativeType
in interface OwFieldDefinition
getNativeType
in class OwSearchCriteria
Exception
public Node getNodeFromValue(Object value_p, Document doc_p) throws Exception
OwFieldDefinition
getNodeFromValue
in interface OwFieldDefinition
getNodeFromValue
in class OwSearchCriteria
value_p
- Object with field valuedoc_p
- DOM Document to add toException
public int getOperator()
OwSearchCriteria
getOperator
in class OwSearchCriteria
public String getOperatorDisplayName(Locale locale_p)
OwSearchCriteria
getOperatorDisplayName
in class OwSearchCriteria
public Collection getOperators() throws Exception
OwFieldDefinition
getOperators
in interface OwFieldDefinition
getOperators
in class OwSearchCriteria
Exception
public String getOriginalJavaClassName()
OwSearchCriteria
getOriginalJavaClassName
in class OwSearchCriteria
String
public OwSearchCriteria getSecondRangeCriteria()
OwSearchCriteria
getSecondRangeCriteria
in class OwSearchCriteria
public Format getTextFormat(int fieldProviderType_p)
OwSearchCriteria
getTextFormat
in interface OwFormat
getTextFormat
in class OwSearchCriteria
fieldProviderType_p
- int as defined in OwFieldProvider.TYPE_...public String getUniqueName()
OwSearchCriteria
getUniqueName
in class OwSearchCriteria
public Object getValue()
OwSearchCriteria
getValue
in interface OwField
getValue
in class OwSearchCriteria
public Object getValueFromNode(Node node_p) throws Exception
OwFieldDefinition
getValueFromNode
in interface OwFieldDefinition
getValueFromNode
in class OwSearchCriteria
node_p
- the serialized value as a XML DOM NodeException
public Object getValueFromString(String text_p) throws Exception
OwSearchCriteria
getValueFromString
in interface OwFieldDefinition
getValueFromString
in class OwSearchCriteria
text_p
- String the serialized valueException
public Collection getWildCardDefinitions()
OwSearchCriteria
getWildCardDefinitions
in class OwSearchCriteria
public boolean ignoreTime()
OwFormat
ignoreTime
in interface OwFormat
ignoreTime
in class OwSearchCriteria
public boolean isAllowWildcard()
OwSearchCriteria
isAllowWildcard
in class OwSearchCriteria
public boolean isArray() throws Exception
OwFieldDefinition
isArray
in interface OwFieldDefinition
isArray
in class OwSearchCriteria
Exception
public boolean isCriteriaOperatorRange()
OwSearchCriteria
isCriteriaOperatorRange
in class OwSearchCriteria
public boolean isDateType()
OwSearchCriteria
isDateType
in class OwSearchCriteria
public boolean isEnum() throws Exception
OwFieldDefinition
isEnum
in interface OwFieldDefinition
isEnum
in class OwSearchCriteria
Exception
public boolean isHidden()
OwSearchCriteria
isHidden
in class OwSearchCriteria
public boolean isIgnoreTime()
OwSearchCriteria
isIgnoreTime
in class OwSearchCriteria
public boolean isReadonly()
OwSearchCriteria
isReadonly
in class OwSearchCriteria
public boolean isRequired()
OwSearchCriteria
isRequired
in interface OwFieldDefinition
isRequired
in class OwSearchCriteria
public boolean isType(Class base_p) throws ClassNotFoundException
OwSearchCriteria
isType
in class OwSearchCriteria
base_p
- a Class
ClassNotFoundException
public void setInitialAndDefaultValue(Object value_p)
OwSearchCriteria
setInitialAndDefaultValue
in class OwSearchCriteria
public void setOperator(int op_p)
OwSearchCriteria
setOperator
in class OwSearchCriteria
public void setValue(Object value_p)
OwSearchCriteria
setValue
in interface OwField
setValue
in class OwSearchCriteria
value_p
- value of field if field is scalar, or a java.io.List of objects if field is an arraypublic void setWildCardDefinitions(Collection wildcarddefinitions_p)
OwSearchCriteria
setWildCardDefinitions
in class OwSearchCriteria
wildcarddefinitions_p
- Collection of OwWildCardDefinition, or null if no wildcards are allowedCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.