ch.elca.el4j.services.persistence.generic.dto
Class DtoFactory

java.lang.Object
  extended by ch.elca.el4j.services.persistence.generic.dto.DtoFactory
All Implemented Interfaces:
InitializingBean

Deprecated. This class in no more used if using AbstractIntOptimisticLockingDto.

public class DtoFactory
extends Object
implements InitializingBean

This class is used to create dto instances. Each dto will get a reference to the modification key generator. This is needed to enable optimistic locking. A dto must be created with this dto factory, when the dto must be written to database. If you only need a dto to get information from it and not to store it in database you can create the dto directly. But recommended is to create each dto with help of this dto factory.

Author:
Martin Zeltner (MZE)
See Also:
AbstractIntOptimisticLockingDto
File-location:
DtoFactory
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Constructor Summary
DtoFactory()
          Deprecated.  
 
Method Summary
 void afterPropertiesSet()
          Deprecated. 
 AbstractDto createDto(Class<?> clazz)
          Deprecated. This method creates a new dto of the given class and fills it with a modification key generator.
 PrimaryKeyGenerator getModificationKeyGenerator()
          Deprecated.  
 AbstractDto initializeDto(Object dto)
          Deprecated. This method sets the modification key generator of a dto.
 List<Object> initializeDtos(List<Object> dtos)
          Deprecated. This metod sets the modification key generator of given AbstractDtos.
 void setModificationKeyGenerator(PrimaryKeyGenerator modificationKeyGenerator)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DtoFactory

public DtoFactory()
Deprecated. 
Method Detail

getModificationKeyGenerator

public PrimaryKeyGenerator getModificationKeyGenerator()
Deprecated. 
Returns:
Returns the modificationKeyGenerator.

setModificationKeyGenerator

public void setModificationKeyGenerator(PrimaryKeyGenerator modificationKeyGenerator)
Deprecated. 
Parameters:
modificationKeyGenerator - Is the modificationKeyGenerator to set.

createDto

public AbstractDto createDto(Class<?> clazz)
Deprecated. 
This method creates a new dto of the given class and fills it with a modification key generator.

Parameters:
clazz - Is the dto class.
Returns:
Returns the created dto.

initializeDto

public AbstractDto initializeDto(Object dto)
Deprecated. 
This method sets the modification key generator of a dto.

Parameters:
dto - Where the modification key generator has to be set.
Returns:
Returns the modificated dto.

initializeDtos

public List<Object> initializeDtos(List<Object> dtos)
Deprecated. 
This metod sets the modification key generator of given AbstractDtos. If the given list of dtos is null an empty List will be returned.

Parameters:
dtos - Where the modification key generator has to be set.
Returns:
Returns the dto list.

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Deprecated. 

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2005-2011 ELCA. All Rights Reserved.