com.retek.commons.component.impl
Class Dto

java.lang.Object
  extended bycom.retek.commons.component.impl.Dto
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AccommodationReasonDto, ActivityRequestDto, ActivityRequestTypeDto, AddressCodeDto, BannerChannelTypeDto, BannerDto, CallCenterDto, CallTagDto, CarrierDto, CatalogRequestDto, CatalogTypeDto, ChannelDto, ChannelTypeDto, CorrespondenceTemplateDto, CorrespondenceTypeDto, CorrespondenceTypeTemplateDto, CountryDto, CreditCardNumberRuleDto, CustomerAddressDto, CustomerChangeReasonDto, CustomerCreditCardDto, CustomerCreditPreApprovalDto, CustomerDto, CustomerEmailAddressDto, CustomerInactiveReasonDto, CustomerMergeRequestDto, CustomerOrderAddressDto, CustomerOrderCorrespondenceRequestDto, CustomerOrderDto, CustomerOrderPaymentHistoryEventDto, CustomerOrderPendReasonDto, CustomerOrderServiceLineDto, CustomerOrderTransactionGroupDto, CustomerPreferenceDto, CustomerTelephoneDto, DailyMessageCategoryDto, DailyMessageDto, DeletableDto, DepictionDto, DirectShipOrderDto, DiscountDto, ECDDRecalculationItemDto, EventDto, GenericEventDto, GiftingSeasonDto, GiftServiceDto, HighRiskZipDto, HistoryEventDto, HistoryEventTypeDto, ItemAttributeScreenTypeDto, ItemCollectionDto, ItemSupplierQuantityBlockDto, LocationDto, MailOrderBatchDto, MatchRuleDto, MediaDemandDto, MediaTypeDto, MessageDto, NegativeCustomerRecordDto, NoCustomerInformationReturnDto, OfferCodeDto, OrderCancelReasonDto, OrderDemandRecordDto, OrderLineDemandRecordDto, OrderLineDto, OrderPartialLineReasonDto, OrderPendReasonDto, OrderSourceDto, OriginalOrderSummaryDto, PaymentPlanCodeDto, PaymentSettlementFileDto, PendRuleDto, PersonalizationColorDto, PersonalizationFontDto, PersonalizationStyleDto, PersonalizationTypeDto, ProductInformationDto, PromotionDto, ReturnLineDto, ReturnReasonDto, RoutingAttributeDto, SaeStoreDayDto, SaeStoreTransactionContainerDto, SaeStoreTransactionCounterDto, SalutationDto, SeasonCodeDto, SellingListDto, ShipmentRequestDto, ShipmentRequestLineDto, ShippedContainerDto, ShippedContainerLineDto, ShippingMethodDto, ShipRestrictionDto, ShipToDto, StoredValueCardCashoutDto, SubConceptDto, SuffixDto, SupplierReturnDispositionDto, TaskDto, TaskTypeDto, TenderTypeDto, TenderTypeGroupDto, UserDto, ValueAddedServiceDto, WorkTaskDto

public abstract class Dto
extends java.lang.Object
implements java.io.Serializable

Holds the internal state of a DistributedObject, with no business rules or validation. Used to transfer state between contexts, and to and from the database.

See Also:
Serialized Form

Constructor Summary
Dto(DistributedContext context, DistributedReference reference)
           
Dto(DistributedReference reference, long version)
          Called from reader DAOs.
 
Method Summary
 java.lang.String attributesToString()
           
static void checkConcurrency(Dto working, Dto persisted)
           
static java.lang.Object deepClone(java.lang.Object value, java.lang.String objectName)
           
 boolean equals(java.lang.Object that)
           
 boolean equalValues(Dto that)
           
 boolean equalValues(Dto that, boolean compareVersionAndDirty)
           
 boolean equalValues(Dto that, boolean compareVersionAndDirty, java.lang.StringBuffer diff)
           
 boolean equalValuesDeep(Dto that)
           
 boolean equalValuesDeep(Dto that, boolean compareVersionAndDirty)
           
 DistributedContext getContext()
           
 java.util.Set getDirtyProperties()
           
static java.util.Collection getDistributedReferences(java.util.Collection dtoCollection)
           
 java.util.List getDtosInTree()
           
 java.util.List getDtosInTree(boolean checkContexts)
           
 java.util.Map getDtosInTreeByRef()
           
 java.util.Map getPropertyMap()
           
 DistributedReference getReference()
           
 long getVersion()
           
 int hashCode()
           
static boolean isConcurrenyCheckEnabled()
           
 boolean isDeleted()
          Dtos are never deleted by default; see DeletableDto.
 boolean isDirty()
           
 boolean isDirtyDeep()
           
 boolean isDirtyDeepIgnoreFields(java.util.Set fieldsToIgnore)
           
 boolean isDirtyIgnoreFields(java.util.Set fieldsToIgnore)
           
 boolean isPersisted()
           
 void markClean()
           
 void markDirty()
           
 void markPersisted()
           
 void mergeIntoContext(DistributedContext intoContext, DistributedReference expectedReference, boolean checkDirty)
           
protected  void mergePropertiesFrom(DistributedContext context, Dto fromDto)
           
 void printDeep(java.io.PrintWriter out, int indent)
           
 void purgeDeletedChildren()
          This is intended to be used immediately after persisting a Dto that may have deleted children.
static void setConcurrenyCheckEnabled(boolean concurrencyCheckEnabled)
           
 java.lang.String toString()
           
 java.lang.String toStringDeep()
           
protected  java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dto

public Dto(DistributedContext context,
           DistributedReference reference)

Dto

public Dto(DistributedReference reference,
           long version)
Called from reader DAOs.

Method Detail

getContext

public final DistributedContext getContext()

getReference

public final DistributedReference getReference()

isPersisted

public final boolean isPersisted()

getVersion

public final long getVersion()

isDeleted

public boolean isDeleted()
Dtos are never deleted by default; see DeletableDto.


isDirty

public final boolean isDirty()

isDirtyDeep

public final boolean isDirtyDeep()

isDirtyDeepIgnoreFields

public final boolean isDirtyDeepIgnoreFields(java.util.Set fieldsToIgnore)

isDirtyIgnoreFields

public final boolean isDirtyIgnoreFields(java.util.Set fieldsToIgnore)

getDirtyProperties

public final java.util.Set getDirtyProperties()

markDirty

public final void markDirty()

markClean

public final void markClean()

deepClone

public static java.lang.Object deepClone(java.lang.Object value,
                                         java.lang.String objectName)

markPersisted

public final void markPersisted()

getDtosInTree

public java.util.List getDtosInTree()

getDtosInTree

public java.util.List getDtosInTree(boolean checkContexts)

getDtosInTreeByRef

public java.util.Map getDtosInTreeByRef()

purgeDeletedChildren

public void purgeDeletedChildren()
This is intended to be used immediately after persisting a Dto that may have deleted children. It removes each Dto marked as deleted from its parent. Calling this method has the side effect of making the entire dto tree clean.


checkConcurrency

public static void checkConcurrency(Dto working,
                                    Dto persisted)
                             throws ConcurrentUpdateException
Throws:
ConcurrentUpdateException

isConcurrenyCheckEnabled

public static boolean isConcurrenyCheckEnabled()

setConcurrenyCheckEnabled

public static void setConcurrenyCheckEnabled(boolean concurrencyCheckEnabled)

mergeIntoContext

public void mergeIntoContext(DistributedContext intoContext,
                             DistributedReference expectedReference,
                             boolean checkDirty)
                      throws ConcurrentUpdateException,
                             SystemException
Throws:
ConcurrentUpdateException
SystemException

mergePropertiesFrom

protected void mergePropertiesFrom(DistributedContext context,
                                   Dto fromDto)
                            throws SystemException
Throws:
SystemException

getDistributedReferences

public static java.util.Collection getDistributedReferences(java.util.Collection dtoCollection)
                                                     throws SystemException
Throws:
SystemException

getPropertyMap

public java.util.Map getPropertyMap()

equals

public final boolean equals(java.lang.Object that)

hashCode

public final int hashCode()

equalValues

public final boolean equalValues(Dto that)

equalValues

public final boolean equalValues(Dto that,
                                 boolean compareVersionAndDirty)

equalValues

public final boolean equalValues(Dto that,
                                 boolean compareVersionAndDirty,
                                 java.lang.StringBuffer diff)

equalValuesDeep

public final boolean equalValuesDeep(Dto that)

equalValuesDeep

public final boolean equalValuesDeep(Dto that,
                                     boolean compareVersionAndDirty)

toString

public java.lang.String toString()

attributesToString

public java.lang.String attributesToString()

toStringDeep

public java.lang.String toStringDeep()

printDeep

public void printDeep(java.io.PrintWriter out,
                      int indent)

writeReplace

protected java.lang.Object writeReplace()


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28