|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.schema.types.AbstractType
public abstract class AbstractType
Field Summary | |
---|---|
static Type[] |
EMPTY_SUPERTYPES
|
static int |
F_NOTNULL
|
static int |
F_READONLY
|
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type |
---|
ANY |
Method Summary | |
---|---|
Object |
decode(String string)
Decodes the string representation into an object of this type. |
String |
encode(Object object)
Encodes the given object that is assumed to be of this type into a string representation. |
TypeHelper |
getHelper()
Get the type helper. |
String |
getName()
Gets the name of this type. |
TypeRef<? extends Type> |
getRef()
Gets a proxy (or reference to this type). |
Schema |
getSchema()
Gets the schema defining this type. |
String |
getSchemaName()
Gets the local name of this type. |
Type |
getSuperType()
Gets the super type. |
Type[] |
getTypeHierarchy()
Gets the entire hierarchy of super-types. |
boolean |
isAny()
|
boolean |
isAnyType()
Tests whether this type is the ANY type. |
boolean |
isComplexType()
Tests whether this type is a complex type. |
boolean |
isCompositeType()
Tests whether this is a composite type. |
boolean |
isListType()
Tests whether this type is a list type. |
boolean |
isNotNull()
Tests whether this type supports null values. |
boolean |
isReadOnly()
Tests whether this type is read-only. |
boolean |
isSimpleType()
Tests whether this type is a simple type. |
boolean |
isSuperTypeOf(Type type)
Tests whether the given type is derived from this type. |
Object |
newInstance()
Creates a new instance according to this type and filled with default values. |
void |
setNotNull(boolean val)
|
void |
setReadOnly(boolean val)
|
boolean |
validate(Object object)
Tests whether the given object is of this type. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.nuxeo.ecm.core.schema.types.ValueConverter |
---|
convert |
Field Detail |
---|
public static final Type[] EMPTY_SUPERTYPES
public static final int F_READONLY
public static final int F_NOTNULL
Method Detail |
---|
public TypeRef<? extends Type> getRef()
Type
getRef
in interface Type
public TypeHelper getHelper()
Type
The type helper is used to handle operations on value of that type.
getHelper
in interface Type
public Type getSuperType()
Type
getSuperType
in interface Type
public String getName()
Type
getName
in interface Type
public String getSchemaName()
Type
getSchemaName
in interface Type
public Schema getSchema()
Type
getSchema
in interface Type
public boolean isSuperTypeOf(Type type)
Type
isSuperTypeOf
in interface Type
type
- the type to test
public boolean isAny()
public Type[] getTypeHierarchy()
Type
The array is ordered as follows:
The returned array is never null. An empty array is returned in the case
of ANY
type.
getTypeHierarchy
in interface Type
public boolean isSimpleType()
Type
isSimpleType
in interface Type
public boolean isComplexType()
Type
isComplexType
in interface Type
public boolean isListType()
Type
isListType
in interface Type
public boolean isAnyType()
Type
isAnyType
in interface Type
public boolean isCompositeType()
Type
isCompositeType
in interface Type
public boolean isNotNull()
Type
isNotNull
in interface Type
public boolean isReadOnly()
Type
isReadOnly
in interface Type
public boolean validate(Object object) throws TypeException
Type
validate
in interface Type
object
- the object to test
TypeException
- if an error occurs trying to retrieve the
supertypespublic void setNotNull(boolean val)
public void setReadOnly(boolean val)
public Object decode(String string)
Type
Returns null if the string can not be decoded.
decode
in interface Type
string
- the string to decode
public String encode(Object object)
Type
Null is returned if the object cannot be converted.
encode
in interface Type
object
- the object to convert
public Object newInstance()
Type
newInstance
in interface Type
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |