org.kuali.rice.kns.bo
Class KualiCodeBase

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kns.bo.KualiCodeBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, BusinessObject, Inactivateable, KualiCode, PersistableBusinessObject
Direct Known Subclasses:
KimCodeBase, Namespace, ParameterType

public class KualiCodeBase
extends PersistableBusinessObjectBase
implements KualiCode

See Also:
Serialized Form

Field Summary
protected  boolean active
           
protected  String code
           
protected  String name
           
private static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
KualiCodeBase()
           
KualiCodeBase(String code)
           
 
Method Summary
 boolean equals(Object obj)
          Implements equals comparing code to code.
 String getCode()
           
 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()
          Indicates whether the record is active or inactive.
 void setActive(boolean a)
          Sets the record to active or inactive.
 void setCode(String code)
           
 void setName(String name)
           
protected  LinkedHashMap toStringMapper()
           
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeInsert, beforeUpdate, beforeUpdate, buildListOfDeletionAwareLists, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
Methods inherited from class org.kuali.rice.kns.bo.BusinessObjectBase
prepareForWorkflow, toString, toStringBuilder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject
prepareForWorkflow
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

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()
Specified by:
getCode in interface KualiCode
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: Inactivateable
Indicates whether the record is active or inactive.

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

setActive

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

Specified by:
setActive in interface Inactivateable
Specified by:
setActive in interface KualiCode
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.


toStringMapper

protected LinkedHashMap toStringMapper()
Specified by:
toStringMapper in class BusinessObjectBase
Returns:
Map containing the fieldValues of the key fields for this class, indexed by fieldName
See Also:
BusinessObjectBase.toStringMapper()

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 © 2004-2011 The Kuali Foundation. All Rights Reserved.