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, ActionInvocation, ActionItem, ActionItemCustomization, ActionRequest, ActionTaken, AdHocRevoke, AdHocToGroup, AdHocToPrincipal, AgendaDefinition, AgendaItemDefinition, AgendaTreeDefinition, AgendaTreeRuleEntry, AgendaTreeSubAgendaEntry, AndPredicate, Assignee, AttributeFields, BaseAttribute, CacheTarget, Campus, CampusQueryResults, CampusType, CampusTypeQueryResults, CategoryDefinition, CodedAttribute, Component, ContextDefinition, ContextSelectionCriteria, Country, CountryQueryResults, County, CountyQueryResults, DataXmlDTO, DelegateMember, DelegateMemberQueryResults, DelegateType, Document, DocumentActionParameters, DocumentActionResult, DocumentAttribute, DocumentContent, DocumentContentUpdate, DocumentDetail, DocumentLink, DocumentProcessingOptions, DocumentSearchCriteria, DocumentSearchCriteriaConfiguration, DocumentSearchResult, DocumentSearchResults, DocumentSearchResultSetConfiguration, DocumentSearchResultValue, DocumentSearchResultValues, DocumentStatusTransition, DocumentType, DocumentTypeAttribute, 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, MapStringActionItemCustomizationAdapter.StringActionItemCustomizationMapEntry, MapStringStringAdapter.StringMapEntryList, MovePoint, MultiValuedStringMapAdapter.MultiValuedStringMapEntryList, Namespace, Note, NotEqualIgnoreCasePredicate, NotEqualPredicate, Notification, NotificationChannel, NotificationChannelReviewer, NotificationContentType, NotificationListRecipient, NotificationPriority, NotificationProducer, NotificationRecipient, NotificationResponse, NotificationSender, NotInIgnoreCasePredicate, NotInPredicate, NotLikePredicate, NotNullPredicate, NullPredicate, OrchestrationConfig, OrPredicate, Parameter, ParameterKey, ParameterQueryResults, ParameterType, PeopleFlowDefinition, PeopleFlowDelegate, PeopleFlowMember, Permission, PermissionQueryResults, PostalCode, PostalCodeQueryResults, Preferences, Principal, PrincipalQueryResults, ProcessDefinition, PropertyDefinition, PropositionDefinition, PropositionParameter, QueryByCriteria, RemotableAbstractControl, RemotableAbstractWidget, RemotableAttributeError, RemotableAttributeField, RemotableAttributeLookupSettings, RemoveAndPublishResult, RequestedActions, Responsibility, ResponsibilityAction, ResponsibilityQueryResults, ReturnPoint, Role, RoleMember, RoleMemberQueryResults, RoleMembership, RoleMembershipQueryResults, RoleName, RolePermission, RoleQueryResults, RoleResponsibility, RoleResponsibilityAction, RouteNode, RouteNodeConfigurationParameter, RouteNodeInstance, RouteNodeInstanceState, RoutePath, RoutingReportActionToTake, RoutingReportCriteria, Rule, RuleDefinition, RuleDelegation, RuleExpression, RuleExtension, RuleQueryResults, RuleReportCriteria, RuleResponsibility, RuleTemplate, RuleTemplateAttribute, RuleTemplateOption, RuleTemplateQueryResults, RuleValidationContext, ServiceDescriptor, ServiceEndpoint, ServiceInfo, State, StateQueryResults, StringToKimEntityNameInfoMapAdapter.StringEntityNameInfoMapEntry, StringToKimEntityNamePrincipalInfoMapAdapter.StringEntNmPrncpInfoMapEntry, Style, Template, TemplateQueryResults, TermDefinition, TermParameterDefinition, TermResolverDefinition, TermSpecificationDefinition, UserChannelSubscription, ValidActions, ValidationResults, WorkflowAttributeDefinition, WorkflowRuleAttributeFields

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