org.kuali.rice.core.api.mo
Class AbstractDataTransferObject

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
All Implemented Interfaces:
Serializable, ModelObjectBasic, ModelObjectComplete
Direct Known Subclasses:
AbstractServiceConfiguration, ActionDefinition, ActionItem, ActionRequest, ActionTaken, AdHocRevoke, AdHocToGroup, AdHocToPrincipal, AgendaDefinition, AgendaItem, AgendaTreeDefinition, AgendaTreeRuleEntry, AgendaTreeSubAgendaEntry, AndPredicate, Assignee, AttributeFields, BaseAttribute, CacheTarget, Campus, CampusType, CategoryDefinition, Component, ContextDefinition, ContextSelectionCriteria, Country, County, DataXmlDTO, DelegateMember, DelegateType, Document, DocumentActionParameters, DocumentActionResult, DocumentAttribute, DocumentContent, DocumentContentUpdate, DocumentDetail, DocumentLink, DocumentLookupCriteria, DocumentLookupCriteriaConfiguration, DocumentLookupResult, DocumentLookupResults, DocumentLookupResultSetConfiguration, DocumentLookupResultValue, DocumentLookupResultValues, DocumentStatusTransition, DocumentType, DocumentUpdate, DocumentWithContent, Entity, EntityAddress, EntityAffiliation, EntityAffiliationType, EntityBioDemographics, EntityCitizenship, EntityDefault, EntityDefaultQueryResults, EntityEmail, EntityEmployment, EntityEthnicity, EntityExternalIdentifier, EntityExternalIdentifierType, EntityName, EntityNamePrincipalName, EntityNameQueryResults, EntityPhone, EntityPrivacyPreferences, EntityQueryResults, EntityResidency, EntityTypeContactInfo, EntityTypeContactInfoDefault, EntityVisa, EqualIgnoreCasePredicate, EqualPredicate, ExtensionDefinition, FunctionDefinition, FunctionParameterDefinition, GreaterThanOrEqualPredicate, GreaterThanPredicate, Group, GroupMember, GroupMemberQueryResults, GroupQueryResults, InIgnoreCasePredicate, InPredicate, KewAttributeDefinition, KewTypeAttribute, KewTypeDefinition, KimAttribute, KimAttributeData, KimAttributeField, KimType, KimTypeAttribute, KrmsAttributeDefinition, KrmsTypeAttribute, KrmsTypeDefinition, LessThanOrEqualPredicate, LessThanPredicate, LikePredicate, MovePoint, MultiValuedStringMapEntryList, Namespace, Note, NotEqualIgnoreCasePredicate, NotEqualPredicate, NotInIgnoreCasePredicate, NotInPredicate, NotLikePredicate, NotNullPredicate, NullPredicate, OrPredicate, Parameter, ParameterKey, ParameterQueryResults, ParameterType, Permission, PostalCode, Principal, PrincipalQueryResults, ProcessDefinition, PropertyDefinition, PropositionDefinition, PropositionParameter, QueryByCriteria, RemotableAbstractControl, RemotableAbstractWidget, RemotableAttributeError, RemotableAttributeField, RemotableAttributeLookupSettings, RemoveAndPublishResult, RequestedActions, Responsibility, ResponsibilityAction, ResponsibilityQueryResults, ReturnPoint, Role, RoleMember, RoleMembership, RolePermission, RoleResponsibility, RoleResponsibilityAction, RouteNode, RouteNodeConfigurationParameter, RouteNodeInstance, RouteNodeInstanceState, RoutePath, RoutingReportActionToTake, RoutingReportCriteria, Rule, RuleDefinition, RuleDelegation, RuleExpression, RuleQueryResults, RuleReportCriteria, RuleResponsibility, RuleTemplate, RuleTemplateAttribute, RuleTemplateOption, RuleValidationContext, ServiceDescriptor, ServiceEndpoint, ServiceInfo, State, StringEntityNameInfoMapEntry, StringEntNmPrncpInfoMapEntry, StringMapEntryList, Style, Template, TemplateQueryResults, TermDefinition, TermParameterDefinition, TermResolverDefinition, TermSpecificationDefinition, Type, ValidActions, ValidationResults, WorkflowAttributeDefinition, WorkflowAttributeValidationError

public abstract class AbstractDataTransferObject
extends Object
implements ModelObjectComplete

All model object's that are Jaxb annotated should extend this class. This class does several important things:

  1. Defines jaxb callback method to ensure that Collection and Map types are unmarshalled into immutable empty forms rather than null values
  2. Defines equals/hashcode/toString
  3. Note: the equals/hashCode implementation excludes field. This element should be present on all jaxb annotated classes.
Important: all classes extending this class must be immutable

See Also:
Serialized Form

Nested Class Summary
protected static class AbstractDataTransferObject.Constants
          Defines some internal constants used on this class.
 
Constructor Summary
protected AbstractDataTransferObject()
           
 
Method Summary
protected  void afterUnmarshal(Unmarshaller u, Object parent)
           
protected  void beforeUnmarshal(Unmarshaller u, Object parent)
           
 boolean equals(Object obj)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDataTransferObject

protected AbstractDataTransferObject()
Method Detail

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

equals

public boolean equals(Object obj)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
obj - to object to compare for equality
Returns:
if equal

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation

beforeUnmarshal

protected void beforeUnmarshal(Unmarshaller u,
                               Object parent)
                        throws Exception
Throws:
Exception

afterUnmarshal

protected void afterUnmarshal(Unmarshaller u,
                              Object parent)
                       throws Exception
Throws:
Exception


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.