|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.wewebu.ow.server.field.OwSearchCriteria
public class OwSearchCriteria
Search criteria tuple containing property, operator and value.
Used to create SQL Statement or a search form entry.
Search are used with OwNetwork.doSearch(...) function.
To be implemented with the specific DMS system.
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
| Field Summary | |
|---|---|
static int |
ATTRIBUTE_ALLOWWILDCARD
attribute bit flag used with m_iAttributes member: Allow the use of wildcards also for integer values, i.e. |
static int |
ATTRIBUTE_HIDDEN
attribute bit flag used with m_iAttributes member: A value that is hidden. |
static int |
ATTRIBUTE_IGNORE_DATE
attribute bit flag used with m_iAttributes member: Ignore the date part of a date value. |
static int |
ATTRIBUTE_IGNORE_TIME
attribute bit flag used with m_iAttributes member: Ignore the time part of a date value. |
static int |
ATTRIBUTE_NONE
attribute bit flag used with m_iAttributes member: No attributes. |
static int |
ATTRIBUTE_READONLY
attribute bit flag used with m_iAttributes member: A value that can not be changed |
static int |
ATTRIBUTE_REQUIRED
attribute bit flag used with m_iAttributes member: A required value that must be filled in. |
protected OwFieldDefinition |
m_FieldDefinition
field definition defining this search criteria |
protected int |
m_iAttributes
flag indicating if the criteria can be edited in a search template view or if it is hidden |
protected int |
m_iOp
criteria operator which should be applied to the value as defined in OwSearchCriteria |
protected Object |
m_oDefaultValue
the default value |
protected Object |
m_oValue
compare value for the search |
protected OwSearchCriteria |
m_secondrangecriteria
optional second child criteria for range searches |
protected String |
m_strInstruction
the instruction to the search criteria |
protected String |
m_strUniqueName
a unique name that identifies this criteria |
protected Collection |
m_wildcarddefinitions
Collection of OwWildCardDefinition wildcard definition for this criteria, or null if no wildcards are allowed |
| Constructor Summary | |
|---|---|
OwSearchCriteria()
|
|
| Method Summary | |
|---|---|
boolean |
canValidate()
check if validation is implemented |
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 |
List |
getComplexChildClasses()
get child properties classes of a complex property 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 iFieldProviderType_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 |
boolean |
ignoreDate()
check if the format should ignore date part of date values |
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 |
isComplex()
check if the property is a component that contains another child properties |
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 |
isIgnoreDate()
check if the criteria ignores the date part |
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 oValue_p)
set the initial/default value for the search |
void |
setOperator(int iOp_p)
set the criteria operator which should be applied to the value as defined in OwSearchCriteria |
void |
setValue(Object oValue_p)
set the compare value for the search |
void |
setWildCardDefinitions(Collection wildcarddefinitions_p)
set the wildcard definitions for this criteria |
String |
toString()
|
String |
validate(int fieldProviderType_p,
Object object_p,
Locale locale_p)
validate the given value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ATTRIBUTE_NONE
public static final int ATTRIBUTE_HIDDEN
public static final int ATTRIBUTE_READONLY
public static final int ATTRIBUTE_REQUIRED
public static final int ATTRIBUTE_ALLOWWILDCARD
public static final int ATTRIBUTE_IGNORE_TIME
public static final int ATTRIBUTE_IGNORE_DATE
protected OwFieldDefinition m_FieldDefinition
protected int m_iOp
protected Object m_oValue
protected Object m_oDefaultValue
protected OwSearchCriteria m_secondrangecriteria
protected int m_iAttributes
protected String m_strInstruction
protected Collection m_wildcarddefinitions
protected String m_strUniqueName
| Constructor Detail |
|---|
public OwSearchCriteria()
| Method Detail |
|---|
public Collection getWildCardDefinitions()
public void setWildCardDefinitions(Collection wildcarddefinitions_p)
wildcarddefinitions_p - Collection of OwWildCardDefinition, or null if no wildcards are allowedpublic String getInstruction()
public int getOperator()
public void setOperator(int iOp_p)
public String getOperatorDisplayName(Locale locale_p)
locale_p -
public OwSearchCriteria getSecondRangeCriteria()
public boolean isCriteriaOperatorRange()
public int getAttributes()
public boolean isHidden()
public boolean isReadonly()
public boolean isRequired()
isRequired in interface OwFieldDefinitionpublic boolean isIgnoreTime()
public boolean isIgnoreDate()
public boolean isAllowWildcard()
public boolean canWildCard()
public Object getValue()
getValue in interface OwFieldpublic void setValue(Object oValue_p)
setValue in interface OwFieldoValue_p - value of field if field is scalar, or a java.io.List of objects if field is an arraypublic void setInitialAndDefaultValue(Object oValue_p)
oValue_p -
public OwFieldDefinition getFieldDefinition()
throws Exception
getFieldDefinition in interface OwFieldExceptionpublic String getUniqueName()
public String getClassName()
OwFieldDefinition
getClassName in interface OwFieldDefinition
public Object getDefaultValue()
throws Exception
getDefaultValue in interface OwFieldDefinitionExceptionpublic String getDisplayName(Locale locale_p)
OwFieldDefinition
getDisplayName in interface OwFieldDefinitionlocale_p - Locale to use
public OwFormat getFormat()
getFormat in interface OwFieldDefinition
public OwEnumCollection getEnums()
throws Exception
OwFieldDefinition
getEnums in interface OwFieldDefinitionExceptionpublic String getJavaClassName()
OwFieldDefinition
getJavaClassName in interface OwFieldDefinitionpublic String getOriginalJavaClassName()
String
public Object getMaxValue()
throws Exception
OwFieldDefinition
getMaxValue in interface OwFieldDefinitionException
public Object getMinValue()
throws Exception
OwFieldDefinition
getMinValue in interface OwFieldDefinitionException
public Object getNativeType()
throws Exception
OwFieldDefinition
getNativeType in interface OwFieldDefinitionException
public Node getNodeFromValue(Object value_p,
Document doc_p)
throws Exception
OwFieldDefinition
getNodeFromValue in interface OwFieldDefinitionvalue_p - Object with field valuedoc_p - DOM Document to add to
Exception
public Object getValueFromNode(Node node_p)
throws Exception
OwFieldDefinition
getValueFromNode in interface OwFieldDefinitionnode_p - the serialized value as a XML DOM Node
Exception
public Object getValueFromString(String text_p)
throws Exception
getValueFromString in interface OwFieldDefinitiontext_p - String the serialized value
Exception
public boolean isArray()
throws Exception
OwFieldDefinition
isArray in interface OwFieldDefinitionException
public boolean isEnum()
throws Exception
OwFieldDefinition
isEnum in interface OwFieldDefinitionExceptionpublic String getDescription(Locale locale_p)
OwFieldDefinition
getDescription in interface OwFieldDefinitionlocale_p - Locale to use
public Collection getOperators()
throws Exception
OwFieldDefinition
getOperators in interface OwFieldDefinitionException
public boolean isType(Class base_p)
throws ClassNotFoundException
base_p - a Class
ClassNotFoundExceptionpublic boolean ignoreTime()
OwFormat
ignoreTime in interface OwFormatpublic Format getTextFormat(int iFieldProviderType_p)
getTextFormat in interface OwFormatiFieldProviderType_p - int as defined in OwFieldProvider.TYPE_...
public boolean isDateType()
public String validate(int fieldProviderType_p,
Object object_p,
Locale locale_p)
OwFormat
validate in interface OwFormatfieldProviderType_p - int as defined in OwFieldProvider.TYPE_...object_p - the value to validatelocale_p - Locale for String localize
public boolean canValidate()
OwFormat
canValidate in interface OwFormatpublic boolean ignoreDate()
OwFormat
ignoreDate in interface OwFormatpublic boolean isComplex()
OwFieldDefinition
isComplex in interface OwFieldDefinitionOwFieldDefinition.getComplexChildClasses()
public List getComplexChildClasses()
throws Exception
OwFieldDefinition
getComplexChildClasses in interface OwFieldDefinitionExceptionOwFieldDefinition.isComplex()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||