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

java.lang.Object
  extended by ch.elca.el4j.services.persistence.generic.dto.AbstractIntOptimisticLockingDto
      extended by ch.elca.el4j.services.persistence.generic.dto.AbstractStringKeyIntOptimisticLockingDto
All Implemented Interfaces:
OptimisticLockingObject, PrimaryKeyObject, PrimaryKeyOptimisticLockingObject, Serializable

@MappedSuperclass
public abstract class AbstractStringKeyIntOptimisticLockingDto
extends AbstractIntOptimisticLockingDto
implements PrimaryKeyOptimisticLockingObject

This class is an abstract dto which uses a string as key value and an integer for optimistic locking version controlling.

Author:
Martin Zeltner (MZE)
See Also:
Serialized Form
File-location:
AbstractStringKeyIntOptimisticLockingDto
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Constructor Summary
AbstractStringKeyIntOptimisticLockingDto()
           
 
Method Summary
 boolean equals(Object obj)
          
 String getKey()
           
 Object getKeyAsObject()
          
 int hashCode()
          
 boolean isKeyNew()
          
 void setKey(Object keyObject)
          
 void setKey(String key)
           
 
Methods inherited from class ch.elca.el4j.services.persistence.generic.dto.AbstractIntOptimisticLockingDto
getOptimisticLockingVersion, increaseOptimisticLockingVersion, setOptimisticLockingVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.elca.el4j.services.persistence.generic.dto.PrimaryKeyObject
useGeneratedKey
 
Methods inherited from interface ch.elca.el4j.services.persistence.generic.dto.OptimisticLockingObject
increaseOptimisticLockingVersion
 

Constructor Detail

AbstractStringKeyIntOptimisticLockingDto

public AbstractStringKeyIntOptimisticLockingDto()
Method Detail

isKeyNew

public boolean isKeyNew()

Specified by:
isKeyNew in interface PrimaryKeyObject
Returns:
Returns true if the primary key is new.

getKey

public String getKey()
Returns:
Returns the key.

getKeyAsObject

public Object getKeyAsObject()

Specified by:
getKeyAsObject in interface PrimaryKeyObject
Returns:
Returns the key as an object or null if it does not exist.

setKey

public void setKey(String key)
Parameters:
key - The key to set.

setKey

public void setKey(Object keyObject)

Specified by:
setKey in interface PrimaryKeyObject
Parameters:
keyObject - Is the key to set.

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 2005-2011 ELCA. All Rights Reserved.