org.kuali.rice.krad.bo
Class KualiCodeBase

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.krad.bo.KualiCodeBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, Inactivatable, MutableInactivatable, Coded, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, KualiCode, PersistableBusinessObject

@MappedSuperclass
public class KualiCodeBase
extends PersistableBusinessObjectBase
implements KualiCode

See Also:
Serialized Form

Field Summary
protected  boolean active
           
protected  String code
           
protected  String name
           
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
KualiCodeBase()
           
KualiCodeBase(String code)
           
 
Method Summary
 boolean equals(Object obj)
          Implements equals comparing code to code.
 String getCode()
          The code value for this object.
 String getCodeAndDescription()
           
static String getCodeAndDescription(String code, String desc)
          Static helper method to allow other classes to provide consistent "code and description" behavior, even if not extending from this class.
 String getName()
           
 int hashCode()
          Overriding equals requires writing a hashCode method.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean a)
          Sets the record to active or inactive.
 void setCode(String code)
           
 void setName(String name)
           
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Field Detail

code

protected String code

name

protected String name

active

protected boolean active
Constructor Detail

KualiCodeBase

public KualiCodeBase()

KualiCodeBase

public KualiCodeBase(String code)
Method Detail

getCode

public String getCode()
Description copied from interface: Coded
The code value for this object. In general a code value cannot be null or a blank string.

Specified by:
getCode in interface Coded
Returns:
Getter for the Code.

setCode

public void setCode(String code)
Specified by:
setCode in interface KualiCode
Parameters:
code - - Setter for the Code.

getName

public String getName()
Specified by:
getName in interface KualiCode
Returns:
Getter for the Name.

setName

public void setName(String name)
Specified by:
setName in interface KualiCode
Parameters:
name - - Setter for the name.

isActive

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

Specified by:
isActive in interface Inactivatable
Returns:
Getter for the active field.

setActive

public void setActive(boolean a)
Description copied from interface: MutableInactivatable
Sets the record to active or inactive.

Specified by:
setActive in interface MutableInactivatable
Parameters:
name - - Setter for the active field.

getCodeAndDescription

public String getCodeAndDescription()
Returns:
Returns the code and description in format: xx - xxxxxxxxxxxxxxxx

getCodeAndDescription

public static String getCodeAndDescription(String code,
                                           String desc)
Static helper method to allow other classes to provide consistent "code and description" behavior, even if not extending from this class.


equals

public boolean equals(Object obj)
Implements equals comparing code to code.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overriding equals requires writing a hashCode method.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


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