public class JboCompOper extends java.lang.Object implements DefPersistable, java.io.Serializable, DiffMergeable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPER_AFTER
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_BEFORE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_BETWEEN
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static int |
OPER_CARDINALITY_NO_MAX |
static java.lang.String |
OPER_CONTAINS
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_CONTAINS_ALL
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_CONTAINS_DELIMITED_ID
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_DOES_NOT_CONTAIN
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_ENDS_WITH
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_EQ
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_EXISTS
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_GE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_GT
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_IN
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_IS_BLANK
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_IS_NOT_BLANK
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_LE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_LIKE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_LT
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_NE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_NOT_BETWEEN
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_NOT_EXISTS
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_NOTIN
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_ON_OR_AFTER
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_ON_OR_BEFORE
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static java.lang.String |
OPER_STARTS_WITH
This is a framework defined system operator and not
meant to be used by a custom operator.
|
static int |
OPER_TODO_ADD |
static int |
OPER_TODO_CLEAR |
static int |
OPER_TODO_KEEP |
static int |
OPER_TODO_REMOVE |
XML_STATEMENT
Constructor and Description |
---|
JboCompOper() |
JboCompOper(int toDo,
java.lang.Class msgBundleClass,
java.lang.String strCode,
java.lang.String oper)
Creates an instance of a comparison operator used in view criteria
|
JboCompOper(int toDo,
java.lang.Class msgBundleClass,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria
|
JboCompOper(int toDo,
java.lang.String operDesc,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria
|
JboCompOper(int toDo,
java.lang.String msgBundleClassName,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria
|
JboCompOper(java.lang.String id,
int toDo,
java.lang.Class msgBundleClass,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria.
|
JboCompOper(java.lang.String id,
int toDo,
java.lang.String operDesc,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria.
|
JboCompOper(java.lang.String id,
int toDo,
java.lang.String msgBundleClassName,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression)
Creates an instance of a comparison operator used in view criteria.
|
Modifier and Type | Method and Description |
---|---|
static void |
addCompOper(int typeGroup,
java.lang.Class msgBundleClass,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality)
For internal use only to load framework operators for a particular type.
|
static void |
addCompOper(int typeGroup,
java.lang.String operDesc,
java.lang.String oper,
int minCardinality,
int maxCardinality)
For internal use only to load framework operators for a particular type.
|
static void |
addCompOperEntry(int typeGroup,
int toDo,
java.lang.Class msgBundleClass,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality)
For internal use only to load framework operators for a particular type.
|
static void |
addCompOperEntry(int typeGroup,
int toDo,
java.lang.String operDesc,
java.lang.String oper,
int minCardinality,
int maxCardinality)
For internal use only to load framework operators for a particular type.
|
void |
applyDiffChildren(DifferDetails dif,
DiffResolver resolver) |
void |
applyDiffContents(DifferDetails dif,
DiffResolver resolver) |
java.lang.Object |
clone() |
DifferDetails |
diffChildren(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails) |
DifferDetails |
diffContents(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails) |
DifferDetails |
diffObjects(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails) |
DifferDetails |
ensureDifferDetails(DifferDetails difDetails) |
boolean |
equals(java.lang.Object other) |
static java.util.HashMap |
getAllBaseCompOpers(LocaleContext locale)
For internal use only.
|
static java.lang.String[][] |
getBaseCompOpers(LocaleContext locale)
For internal use only.
|
static void |
getCompOperList(int typeGroup,
java.util.ArrayList list)
The list of operators for a specific type.
|
java.lang.String |
getDefXMLElementTag()
For internal use only
|
java.lang.String |
getDefXMLNameSpace()
For internal use only
|
java.lang.String |
getExpression() |
ExpressionDef |
getExpressionDef() |
java.lang.String |
getFullName()
This method returns the Persistence reference of the object.
|
java.lang.String |
getId() |
int |
getMaxCardinality() |
java.lang.Class |
getMessageBundleClass() |
int |
getMinCardinality() |
java.lang.String |
getName() |
java.lang.String |
getOper() |
java.lang.String |
getOperDesc() |
java.lang.String |
getOperDescStr(LocaleContext locale) |
java.lang.String |
getOperDescStrCode() |
DefPersistable |
getOrigObject() |
int |
getToDo() |
java.lang.String |
getXMLElementTag()
For internal use only
|
void |
init(java.lang.String id,
int toDo,
java.lang.String strCode,
java.lang.String oper,
int minCardinality,
int maxCardinality,
java.lang.String expression) |
static void |
internalSealStaticOpers()
Deprecated.
since 11.1.1.5.1
For internal framework use only. Implementation and signature may change without notice.
|
boolean |
isDirty()
This method returns if an Object is modified from last save/load
|
boolean |
isNew()
This method returns if this object is previously persisted.
|
boolean |
isRelationalOperator()
If a view criteria item has a value set, temporary bind variables are
generated for the values to use statement caching efficiently.
|
void |
loadXMLContent(DefElement xmlElement) |
static void |
mergeEntries(java.util.ArrayList opers,
java.util.ArrayList list)
For internal use only.
|
static void |
mergeEntry(java.util.ArrayList list,
int toDo,
java.lang.Object ent)
For internal use only.
|
static void |
populateCompOpers() |
static java.lang.String[][] |
processCompOpers(LocaleContext locale,
java.util.ArrayList list) |
void |
setDirty(boolean isDirty)
This method marks the Object dirty
|
void |
setExpressionDef(ExpressionDef exprDef) |
void |
setMessageBundleClass(java.lang.Class cls) |
void |
setMessageBundleClassName(java.lang.String msgBundleClassName) |
void |
setNew(boolean b)
This method marks the as previously persisted.
|
void |
setOperDesc(java.lang.String operDesc)
sets the non-translatable operator description.
|
void |
setOrigObject(DefPersistable oldObj) |
void |
setResourceBundleDef(ResourceBundleDef def) |
void |
writeChildren(DefWriter jos)
Writes the Object's children to the Persistent storage
|
void |
writeContents(DefWriter jos)
Objects should write their persistence output in this method
|
void |
writeContents(DefWriter jos,
boolean bWriteId) |
void |
writeObject(DefWriter jos)
Objects should write their persistence output in this method
|
public static final java.lang.String OPER_EQ
public static final java.lang.String OPER_GT
public static final java.lang.String OPER_GE
public static final java.lang.String OPER_LT
public static final java.lang.String OPER_LE
public static final java.lang.String OPER_NE
public static final java.lang.String OPER_LIKE
public static final java.lang.String OPER_CONTAINS
public static final java.lang.String OPER_DOES_NOT_CONTAIN
public static final java.lang.String OPER_CONTAINS_DELIMITED_ID
public static final java.lang.String OPER_STARTS_WITH
public static final java.lang.String OPER_ENDS_WITH
public static final java.lang.String OPER_IS_BLANK
public static final java.lang.String OPER_IS_NOT_BLANK
public static final java.lang.String OPER_BETWEEN
public static final java.lang.String OPER_NOT_BETWEEN
public static final java.lang.String OPER_BEFORE
public static final java.lang.String OPER_AFTER
public static final java.lang.String OPER_ON_OR_BEFORE
public static final java.lang.String OPER_ON_OR_AFTER
public static final java.lang.String OPER_EXISTS
public static final java.lang.String OPER_NOT_EXISTS
public static final java.lang.String OPER_IN
public static final java.lang.String OPER_NOTIN
public static final java.lang.String OPER_CONTAINS_ALL
public static final int OPER_TODO_KEEP
public static final int OPER_TODO_ADD
public static final int OPER_TODO_REMOVE
public static final int OPER_TODO_CLEAR
public static final int OPER_CARDINALITY_NO_MAX
public JboCompOper()
public JboCompOper(int toDo, java.lang.Class msgBundleClass, java.lang.String strCode, java.lang.String oper)
toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the owner.msgBundleClass
- the message bundle that holds the description of the
operator displayed in the search formstrCode
- the key used to lookup the message bundleoper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" msgbundleClass
could be "OperatorsBundle"
and strCode
could be "GREATER_THAN". The bundle may contain the
value "Greater than" for key "GREATER_THAN".public JboCompOper(int toDo, java.lang.Class msgBundleClass, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the ownermsgBundleClass
- the message bundle that holds the description of the
operator displayed in the search formstrCode
- the key used to lookup the message bundleoper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" msgbundleClass
could be "OperatorsBundle"
and strCode
could be "GREATER_THAN". The bundle may contain the
value "Greater than" for key "GREATER_THAN".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public JboCompOper(java.lang.String id, int toDo, java.lang.Class msgBundleClass, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
id
- The string used to identify a comp operator occurence uniquely
under an owner. Theoretically a user can remove a system provided operator
and implement an overridden version. For example TODO_REMOVE, > and
TODO_ADD, >, custom expression. The same operator is repeated twice and
hence the need to introduce a unique attribute to identify an element.toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the ownermsgBundleClass
- the message bundle that holds the description of the
operator displayed in the search formstrCode
- the key used to lookup the message bundleoper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" msgbundleClass
could be "OperatorsBundle"
and strCode
could be "GREATER_THAN". The bundle may contain the
value "Greater than" for key "GREATER_THAN".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public JboCompOper(int toDo, java.lang.String msgBundleClassName, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the ownermsgBundleClassName
- the message bundle name that holds the description of the
operator displayed in the search formstrCode
- the key used to lookup the message bundleoper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" msgbundleClass
could be "OperatorsBundle"
and strCode
could be "GREATER_THAN". The bundle may contain the
value "Greater than" for key "GREATER_THAN".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public JboCompOper(java.lang.String id, int toDo, java.lang.String msgBundleClassName, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
id
- The string used to identify a comp operator occurence uniquely
under an owner. Theoretically a user can remove a system provided operator
and implement an overridden version. For example TODO_REMOVE, > and
TODO_ADD, >, custom expression. The same operator is repeated twice and
hence the need to introduce a unique attribute to identify an element.toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the ownermsgBundleClassName
- the message bundle name that holds the description of the
operator displayed in the search formstrCode
- the key used to lookup the message bundleoper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" msgbundleClass
could be "OperatorsBundle"
and strCode
could be "GREATER_THAN". The bundle may contain the
value "Greater than" for key "GREATER_THAN".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public JboCompOper(int toDo, java.lang.String operDesc, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the owner.operDesc
- a non-translatable description for the operator.oper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" operDesc
could be passed in
as "Greater than".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public JboCompOper(java.lang.String id, int toDo, java.lang.String operDesc, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
id
- The string used to identify a comp operator occurence uniquely
under an owner. Theoretically a user can remove a system provided operator
and implement an overridden version. For example TODO_REMOVE, > and
TODO_ADD, >, custom expression. The same operator is repeated twice and
hence the need to introduce a unique attribute to identify an element.toDo
- use OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the owner.operDesc
- a non-translatable description for the operator.oper
- the operator string saved in the view criteria item xml. For example
oper
could be ">" operDesc
could be passed in
as "Greater than".minCardinality
- the minimum cardinality of the operator. for example
"greater than" has a minimum cardinality of 1 and "is not null" operator has
a minimum cardinality of 0.maxCardinality
- the maximum cardinality of the operator. for example
"greater than" has a maximum cardinality of 1 and "between" has a maximum
cardinality of 2.expression
- a groovy expression that returns a where clause fragment.
The expression is passed a reference to a ViewCriteriaItem
and
can introspect into the values of the item by calling public methods on it.public void init(java.lang.String id, int toDo, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality, java.lang.String expression)
public static void internalSealStaticOpers()
public static void populateCompOpers()
public static void addCompOper(int typeGroup, java.lang.Class msgBundleClass, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality)
public static void addCompOper(int typeGroup, java.lang.String operDesc, java.lang.String oper, int minCardinality, int maxCardinality)
public static void addCompOperEntry(int typeGroup, int toDo, java.lang.Class msgBundleClass, java.lang.String strCode, java.lang.String oper, int minCardinality, int maxCardinality)
public static void addCompOperEntry(int typeGroup, int toDo, java.lang.String operDesc, java.lang.String oper, int minCardinality, int maxCardinality)
public static void mergeEntry(java.util.ArrayList list, int toDo, java.lang.Object ent)
list
- the collected list of operators.toDo
- OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the owner.ent
- the operator entry that is applying the change.public static void mergeEntries(java.util.ArrayList opers, java.util.ArrayList list)
opers
- the collected list of operators.list
- the list of changes to be applied on opers.public static void getCompOperList(int typeGroup, java.util.ArrayList list)
typeGroup
- the type for which the operators need to be returned.list
- the list of operators.public static java.util.HashMap getAllBaseCompOpers(LocaleContext locale)
public static java.lang.String[][] getBaseCompOpers(LocaleContext locale)
public static java.lang.String[][] processCompOpers(LocaleContext locale, java.util.ArrayList list)
locale
- the locale to fetch the operator descriptionslist
- the list of operatorslist
and
each element containing the operator name and descriptionpublic int getToDo()
OPER_TODO_ADD
, OPER_TODO_REMOVE
and OPER_TODO_CLEAR
to add, remove or remove all operators defined
on the owner.public java.lang.String getId()
public java.lang.Class getMessageBundleClass()
public void setMessageBundleClass(java.lang.Class cls)
cls
- The message bundle class that holds the description of the operator.public void setMessageBundleClassName(java.lang.String msgBundleClassName)
cls
- The message bundle class name that holds the description of the operator.public void setResourceBundleDef(ResourceBundleDef def)
def
- ResourceBundleDef
is an abstraction around alternate
message bundle types supported by the framework like xlf, properties bundle.public java.lang.String getOperDescStrCode()
public java.lang.String getOperDesc()
public java.lang.String getOperDescStr(LocaleContext locale)
locale
- the locale used to fetch the operator descriptionpublic void setOperDesc(java.lang.String operDesc)
public int getMinCardinality()
public int getMaxCardinality()
public java.lang.String getOper()
public java.lang.String getExpression()
public ExpressionDef getExpressionDef()
public void setExpressionDef(ExpressionDef exprDef)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean isDirty()
DefPersistable
isDirty
in interface DefPersistable
public void setDirty(boolean isDirty)
DefPersistable
setDirty
in interface DefPersistable
isDirty
- If true the Object is marked Dirty.public boolean isNew()
DefPersistable
isNew
in interface DefPersistable
public void setNew(boolean b)
DefPersistable
setNew
in interface DefPersistable
b
- If true the Object is marked as new object.public java.lang.String getName()
getName
in interface DiffMergeable
public java.lang.String getFullName()
DefPersistable
getFullName
in interface DiffMergeable
getFullName
in interface DefPersistable
public DefPersistable getOrigObject()
getOrigObject
in interface DefPersistable
public void setOrigObject(DefPersistable oldObj)
setOrigObject
in interface DefPersistable
public void writeObject(DefWriter jos)
PersistentDefinition
writeObject
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void writeContents(DefWriter jos, boolean bWriteId)
public void writeChildren(DefWriter jos)
PersistentDefinition
writeChildren
in interface PersistentDefinition
jos
- the Output storage for persistencepublic void loadXMLContent(DefElement xmlElement)
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
public java.lang.String getXMLElementTag()
getXMLElementTag
in interface PersistentDefinition
public java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace
in interface PersistentDefinition
public boolean isRelationalOperator()
true
if the operator is relational.public DifferDetails ensureDifferDetails(DifferDetails difDetails)
ensureDifferDetails
in interface DiffMergeable
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
diffContents
in interface DiffMergeable
public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
diffChildren
in interface DiffMergeable
public DifferDetails diffObjects(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
diffObjects
in interface DiffMergeable
public void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
applyDiffChildren
in interface DiffMergeable
public void applyDiffContents(DifferDetails dif, DiffResolver resolver)
applyDiffContents
in interface DiffMergeable