Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.schema.types
Class PrimitiveType

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.types.AbstractType
      extended by org.nuxeo.ecm.core.schema.types.PrimitiveType
All Implemented Interfaces:
Serializable, SimpleType, Type, ValueConverter
Direct Known Subclasses:
BinaryType, BooleanType, DateType, DoubleType, IntegerType, LongType, StringType

public abstract class PrimitiveType
extends AbstractType
implements SimpleType

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
EMPTY_SUPERTYPES, F_NOTNULL, F_READONLY
 
Fields inherited from interface org.nuxeo.ecm.core.schema.types.Type
ANY
 
Method Summary
 SimpleType getPrimitiveType()
           
 TypeRef<PrimitiveType> getRef()
          Gets a proxy (or reference to this type).
 Type getSuperType()
          Gets the super type.
 Type[] getTypeHierarchy()
          Gets the entire hierarchy of super-types.
 boolean isPrimitive()
          Tests whether this type is a primitive type.
 boolean isSimpleType()
          Tests whether this type is a simple type.
abstract  boolean validate(Object object)
          Tests whether the given object is of this type.
 
Methods inherited from class org.nuxeo.ecm.core.schema.types.AbstractType
decode, encode, getHelper, getName, getSchema, getSchemaName, isAny, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf, newInstance, setNotNull, setReadOnly
 
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.Type
decode, encode, getHelper, getName, getSchema, getSchemaName, isAnyType, isComplexType, isCompositeType, isListType, isNotNull, isReadOnly, isSuperTypeOf, newInstance
 
Methods inherited from interface org.nuxeo.ecm.core.schema.types.ValueConverter
convert
 

Method Detail

validate

public abstract boolean validate(Object object)
Description copied from interface: Type
Tests whether the given object is of this type.

Specified by:
validate in interface Type
Overrides:
validate in class AbstractType
Parameters:
object - the object to test
Returns:
true if the given object if of this type, false otherwise

getSuperType

public Type getSuperType()
Description copied from interface: Type
Gets the super type.

Specified by:
getSuperType in interface Type
Overrides:
getSuperType in class AbstractType
Returns:
the super type or null if this is a primitive type

getTypeHierarchy

public Type[] getTypeHierarchy()
Description copied from interface: Type
Gets the entire hierarchy of super-types.

The array is ordered as follows:

The returned array is never null. An empty array is returned in the case of ANY type.

Specified by:
getTypeHierarchy in interface Type
Overrides:
getTypeHierarchy in class AbstractType
Returns:
an array containing the supertypes of this type

isPrimitive

public boolean isPrimitive()
Description copied from interface: SimpleType
Tests whether this type is a primitive type.

Specified by:
isPrimitive in interface SimpleType
Returns:
true if this type is a primitive type, false otherwise

isSimpleType

public boolean isSimpleType()
Description copied from interface: Type
Tests whether this type is a simple type.

Specified by:
isSimpleType in interface Type
Overrides:
isSimpleType in class AbstractType
Returns:
true if this type is a simple type, false otherwise

getPrimitiveType

public SimpleType getPrimitiveType()
Specified by:
getPrimitiveType in interface SimpleType

getRef

public TypeRef<PrimitiveType> getRef()
Description copied from interface: Type
Gets a proxy (or reference to this type).

Specified by:
getRef in interface SimpleType
Specified by:
getRef in interface Type
Overrides:
getRef in class AbstractType
Returns:
a reference to the type

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.