org.kuali.rice.kim.api.type
Class KimType

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by org.kuali.rice.kim.api.type.KimType
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelObjectBasic, ModelObjectComplete, KimTypeContract

public final class KimType
extends AbstractDataTransferObject
implements KimTypeContract

An immutable representation of a KimTypeContract.

To construct an instance of a KimType, use the KimType.Builder class.

See Also:
KimTypeContract, Serialized Form

Nested Class Summary
static class KimType.Builder
          This builder constructs an KimType enforcing the constraints of the KimTypeContract.
static class KimType.Cache
           
 
Method Summary
 KimTypeAttribute getAttributeDefinitionById(String id)
          Gets the KimTypeAttribute matching the id of it's KimAttribute.
 KimTypeAttribute getAttributeDefinitionByName(String name)
          Gets the KimTypeAttribute matching the name of it's KimAttribute.
 List<KimTypeAttribute> getAttributeDefinitions()
          The list of attribute definitions associated with the kim type.
 String getId()
          The unique identifier for an object.
 String getName()
          The name of the kim type.
 String getNamespaceCode()
          The namespace code that this kim type belongs too.
 String getObjectId()
          Return the globally unique object id of this object.
 String getServiceName()
          The service name used to resolve attribute values.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getAttributeDefinitionById

public KimTypeAttribute getAttributeDefinitionById(String id)
Gets the KimTypeAttribute matching the id of it's KimAttribute. If no attribute definition exists with that id then null is returned.

If multiple exist with the same id then the first match is returned. Since id is supposed to be unique this should not be a problem in practice.

Parameters:
id - the KimTypeAttribute.KimAttribute's id
Returns:
the KimTypeAttribute or null
Throws:
IllegalArgumentException - if the id is blank

getAttributeDefinitionByName

public KimTypeAttribute getAttributeDefinitionByName(String name)
Gets the KimTypeAttribute matching the name of it's KimAttribute. If no attribute definition exists with that name then null is returned.

If multiple exist with the same name then the first match is returned. Since name is supposed to be unique this should not be a problem in practice.

Parameters:
name - the KimTypeAttribute's name
Returns:
the KimTypeAttribute or null
Throws:
IllegalArgumentException - if the name is blank

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

getServiceName

public String getServiceName()
Description copied from interface: KimTypeContract
The service name used to resolve attribute values.

Specified by:
getServiceName in interface KimTypeContract
Returns:
the service name

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: KimTypeContract
The namespace code that this kim type belongs too.

Specified by:
getNamespaceCode in interface KimTypeContract
Returns:
namespace code

getName

public String getName()
Description copied from interface: KimTypeContract
The name of the kim type.

Specified by:
getName in interface KimTypeContract
Returns:
the name

getAttributeDefinitions

public List<KimTypeAttribute> getAttributeDefinitions()
Description copied from interface: KimTypeContract
The list of attribute definitions associated with the kim type. This cannot be null. If no attribute definitions are associated with the kim type then this will return an empty collection.

Specified by:
getAttributeDefinitions in interface KimTypeContract
Returns:
the list of attribute definitions

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.