|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DataType
public class DataType
A data type, analagous to a java.lang.Class.
Data types store the definition of the data, i.e. their structure, presentation & validation properties.
Each data object is releated to a data type, in the same way that each java.lang.Object instance has a Class.
Subclasses of this class are deployed as singletons by the Designer.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
Field Summary | |
---|---|
protected boolean |
duringParsing
|
protected boolean |
hasEnumerations
Validates an object against its data type properties. |
protected boolean |
hasPatternMatching
|
protected boolean |
qualifierValidation
|
Method Summary | |
---|---|
void |
addDerivedType(String typeName,
DataType derivedType)
s Adds a derived type. |
void |
addValidator(int index,
Validator validator)
Adds a validator at index . |
void |
addValidator(Validator validator)
Adds a validator. |
Set |
derivedTypeKeySet()
Returns a Set containing the names of all types derived from this type. |
Annotation |
getAnnotation()
Returns the annotation associated with this type. |
String |
getDatabaseColumnName()
Returns the name of the database column that this component represents. |
DataType |
getDerivedType(String typeName)
Returns a type derived from this type called typeName . |
DataType |
getDerivedType(String typeName,
String uri)
Returns a type derived from this type called typeName in namespace uri . |
DataType[] |
getDerivedTypes(String typeName)
Returns all types derived from this type called typeName in any namespace. |
String |
getDescription()
Returns a description of this type. |
Enumeration |
getEnumeration()
Returns the enumeration applied to this type. |
String[] |
getInitiator()
Returns the initiator(s). |
DataModel |
getModel()
Returns the model. |
String |
getName()
Returns the name of this component. |
Element |
getNullDefiningElementDecl()
Returns the element that will be used to define objects created in the absence of any other defining element declaration. |
String |
getOriginalName()
Returns the original name if it is different to the name property, otherwise the name is returned. |
String |
getOriginalPatternMatch()
Gets the original pattern match. |
String |
getPatternMatch()
Returns the pattern match. |
PatternTypeEnum |
getPatternType()
Returns the syntax of the pattern. |
String[] |
getTerminator()
Returns the terminator(s). |
Validator |
getValidator(int index)
Returns the validator at index . |
int |
getValidatorCount()
Returns the number of validators defined for this type. |
int |
getValidatorIndex(Validator v)
Returns the index of v . |
Class |
getValidObjectClass()
Returns the class of valid objects of this type. |
boolean |
hasDerivedTypes()
Return whether this type has derived types. |
boolean |
isComplex()
Returns whether this type is complex. |
boolean |
isLocal()
Returns whether this type is local, i.e. defined within another type. |
boolean |
isSimple()
Returns whether this type is simple. |
boolean |
isValidObjectClass(Class c)
Returns whether c is the class of a valid object of this type. |
void |
removeDerivedType(String typeName,
String uri)
Removes a derived type. |
void |
removeValidator(int index)
Removed the validator at index . |
void |
setAnnotation(Annotation annotation)
Sets the annotation. |
void |
setDatabaseColumnName(String databaseColumnName)
Sets the database column name of the component |
void |
setInitiator(String[] initiator)
Sets the initiator(s). |
void |
setLocal(boolean local)
Sets whether this type is local. |
void |
setModel(DataModel model)
Sets the model. |
void |
setName(String name)
Sets the name. |
void |
setOriginalName(String originalName)
Sets the original name of the component. |
void |
setOriginalPatternMatch(String originalPatternMatch)
Sets the original pattern match. |
void |
setPatternMatch(String patternMatch)
Sets the pattern match. |
void |
setPatternType(PatternTypeEnum patternType)
Sets the type of pattern match. |
void |
setTerminator(String[] terminator)
Sets the terminator(s). |
String |
toString()
|
boolean |
validate(Object obj,
DataComponent comp,
ComplexDataObject context)
Deprecated. Use ValidationManager instead - this method will be removed in the next major version release. |
boolean |
validateProperties(Object object,
ComplexDataObject context,
DataComponent comp,
ValidationConstraints constraints)
Deprecated. Use ValidationManager instead - this method will be removed in the next major version release. |
boolean |
validateProperties(Object object,
DataComponent comp,
ComplexDataObject context,
ValidationManager manager)
|
boolean |
validateProperties(Object object,
DataComponent comp,
ComplexDataObject context,
ValidationManager manager,
boolean duringParsing)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean hasEnumerations
protected boolean hasPatternMatching
protected boolean qualifierValidation
protected boolean duringParsing
Method Detail |
---|
public Element getNullDefiningElementDecl()
public boolean isSimple()
true
from this method if it is derived from a simple type.
public boolean isComplex()
public String getName()
ModelComponent
getName
in interface ModelComponent
public void setName(String name)
name
- The name.public DataModel getModel()
public void setModel(DataModel model)
model
- The model.public String getOriginalName()
public void setOriginalName(String originalName)
originalName
- The new original name.public String getDatabaseColumnName()
public void setDatabaseColumnName(String databaseColumnName)
databaseColumnName
- The actual database column namepublic boolean isLocal()
public void setLocal(boolean local)
local
- The new value.public DataType getDerivedType(String typeName)
typeName
.The type is assumed to be in the same namespace as this type.
typeName
- The name of the type to return.
null
otherwise.getDerivedType(String, String)
,
getDerivedTypes(String)
,
derivedTypeKeySet()
public DataType getDerivedType(String typeName, String uri)
typeName
in namespace uri
.
typeName
- The name of the type to return.uri
- The namespace uri, or null
to return the first derived type found with the given name.
null
otherwise.derivedTypeKeySet()
public DataType[] getDerivedTypes(String typeName)
typeName
in any namespace.
typeName
- The name of the type to return.
derivedTypeKeySet()
public boolean hasDerivedTypes()
public Set derivedTypeKeySet()
public void addDerivedType(String typeName, DataType derivedType)
typeName
- The name of the type.derivedType
- The type.
IllegalArgumentException
- If derivedType
does not have a model associated with it.public void removeDerivedType(String typeName, String uri)
typeName
- The name of the type.uri
- The namespace uri of the type.public Annotation getAnnotation()
public void setAnnotation(Annotation annotation)
annotation
- The annotation.public String getDescription()
The description is taken from the annotation if one is present, otherwise the empty string is returned.
public String[] getInitiator()
null
if no initiators have been
specified.
public void setInitiator(String[] initiator)
initiator
- The initiator(s).public String[] getTerminator()
null
if no terminators have been
specified.
public void setTerminator(String[] terminator)
terminator
- The terminator(s).public String getPatternMatch()
getPatternType()
.
public void setPatternMatch(String patternMatch)
patternMatch
- The pattern match.public String getOriginalPatternMatch()
getPatternMatch()
if the pattern has been interpreted into a different syntax, e.g. for SWIFT.
public void setOriginalPatternMatch(String originalPatternMatch)
originalPatternMatch
- The original pattern match.public PatternTypeEnum getPatternType()
public void setPatternType(PatternTypeEnum patternType)
patternType
- The type of pattern match.public int getValidatorCount()
public Validator getValidator(int index)
index
.
index
- The index.
public int getValidatorIndex(Validator v)
v
.
v
- The validator.
public Enumeration getEnumeration()
public void addValidator(Validator validator)
validator
- The validator to add.public void addValidator(int index, Validator validator)
index
.
validator
- The validator to add.index
- The index to add it at.public void removeValidator(int index)
index
.
index
- The index.public boolean validateProperties(Object object, ComplexDataObject context, DataComponent comp, ValidationConstraints constraints) throws ValidationException
ValidationManager
instead - this method will be removed in the next major version release.
object
- An object representing the value to be validated.context
- The context in which the object appears.comp
- The component representing the instance of this type being validated.constraints
- The validation constraints to be used in performing validation.
true
if the object is valid against its type.
ValidationException
- if the object is not valid against its type.
IllegalArgumentException
- If object
is not a valid object class.public boolean validateProperties(Object object, DataComponent comp, ComplexDataObject context, ValidationManager manager) throws ValidationException
ValidationException
public boolean validateProperties(Object object, DataComponent comp, ComplexDataObject context, ValidationManager manager, boolean duringParsing) throws ValidationException
ValidationException
public String toString()
toString
in class Object
public boolean isValidObjectClass(Class c)
c
is the class of a valid object of this type.
c
- The class.
public Class getValidObjectClass()
public boolean validate(Object obj, DataComponent comp, ComplexDataObject context) throws ValidationException
ValidationManager
instead - this method will be removed in the next major version release.
obj
- The object to be validated.comp
- The defining element or attribute of the object to be validated.context
- The context.
ValidationException
- If the object is not valid AND the validation mechanism specified for obj
is ValidationMechanismEnum.VALIDATION_MECHANISM_EXCEPTION
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |