org.equanda.persistence
Interface ObjectType

All Superinterfaces:
Serializable
All Known Implementing Classes:
EquandaObjectType

public interface ObjectType
extends Serializable

Special utility class to determine whether this object is of a certain type (whether the given type is a template for this type).

Author:
Joachim Van der Auwera

Method Summary
 Collection<String> getAllowedStringValues()
          Returns a list of table type identifiers which are valid (specialized) versions of this table/class.
 String[] getChildTypes()
          Get the allowed child types
 String getName()
          Get the full name for this type
 String[] getParentTypes()
          Get the allowed parent types
 String getType()
          Get the type identifier for this type
 boolean isParentType(String type)
          Check whether the given type "is a child of" (or the type itself).
 boolean isType(String type)
          Check whether this type is "instanceof" the given type (type itself or a child thereof).
 

Method Detail

isParentType

boolean isParentType(String type)
Check whether the given type "is a child of" (or the type itself).

For example, in a hierarchy Object-Vehicle-Car, Vehicle.isParentTypeStatic(Vehicle) returns true Vehicle.isParentTypeStatic(Car) returns true Vehicle.isParentTypeStatic(Object) returns false

Parameters:
type - type identifier (four letters) for the type to test
Returns:
true when it is an "instanceof"

isType

boolean isType(String type)
Check whether this type is "instanceof" the given type (type itself or a child thereof).

Parameters:
type - type identifier (four letters) for the type to test
Returns:
true when it is an "instanceof"

getType

String getType()
Get the type identifier for this type

Returns:
type identifier for this type

getName

String getName()
Get the full name for this type

Returns:
full name for this type

getAllowedStringValues

Collection<String> getAllowedStringValues()
Returns a list of table type identifiers which are valid (specialized) versions of this table/class.

Returns:
allowed type identifiers

getChildTypes

String[] getChildTypes()
Get the allowed child types

Returns:
arracy of child types

getParentTypes

String[] getParentTypes()
Get the allowed parent types

Returns:
arracy of parent types


Copyright © 2007-2009. All Rights Reserved.