ch.elca.el4j.util.objectwrapper.impl
Class KeyedVersionedReflectionImpl

java.lang.Object
  extended by ch.elca.el4j.util.objectwrapper.impl.AbstractWrapper
      extended by ch.elca.el4j.util.objectwrapper.impl.KeyedVersionedReflectionImpl
All Implemented Interfaces:
KeyedVersioned, Wrappable, Cloneable

public class KeyedVersionedReflectionImpl
extends AbstractWrapper
implements KeyedVersioned

Implementation of KeyedVersioned that uses reflection on properties "key" and "version".

Author:
David Bernhard (DBD)
File-location:
KeyedVersionedReflectionImpl
Last check-in date:
2009-08-04 15:13:46 +0200 (Di, 04. Aug 2009) by swismer for revision 3879

Field Summary
 
Fields inherited from class ch.elca.el4j.util.objectwrapper.impl.AbstractWrapper
m_target, m_wrapper
 
Constructor Summary
KeyedVersionedReflectionImpl()
          Empty constructor which uses "key" and "version" as properties.
KeyedVersionedReflectionImpl(String keyName, String versionName)
          Create the wrapper class providing property names for key and version.
 
Method Summary
 void create()
          Override this in implementations to instantiate an object.
 Serializable getKey()
          
 Class<?> getKeyClass()
          
 Serializable getVersion()
          
 Class<?> getVersionClass()
          
 void setKey(Serializable key)
          Set the object's key.
 void setVersion(Serializable version)
          Set the version.
 
Methods inherited from class ch.elca.el4j.util.objectwrapper.impl.AbstractWrapper
clone, setTarget, setWrapper
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyedVersionedReflectionImpl

public KeyedVersionedReflectionImpl()
Empty constructor which uses "key" and "version" as properties.


KeyedVersionedReflectionImpl

public KeyedVersionedReflectionImpl(String keyName,
                                    String versionName)
Create the wrapper class providing property names for key and version.

Parameters:
keyName - The key property name.
versionName - The version property name.
Method Detail

create

public void create()
Override this in implementations to instantiate an object. A successful return indicates creation succeeded.

Specified by:
create in class AbstractWrapper

getKey

public Serializable getKey()

Specified by:
getKey in interface KeyedVersioned
Returns:
The key this object holds.

getVersion

public Serializable getVersion()

Specified by:
getVersion in interface KeyedVersioned
Returns:
The version.

setKey

public void setKey(Serializable key)
Set the object's key.

Specified by:
setKey in interface KeyedVersioned
Parameters:
key - The key to set.

setVersion

public void setVersion(Serializable version)
Set the version.

Specified by:
setVersion in interface KeyedVersioned
Parameters:
version - The version to set.

getKeyClass

public Class<?> getKeyClass()

Specified by:
getKeyClass in interface KeyedVersioned
Returns:
The effective class of the key property.

getVersionClass

public Class<?> getVersionClass()

Specified by:
getVersionClass in interface KeyedVersioned
Returns:
The effective class of the version property.


Copyright © 2005-2011 ELCA. All Rights Reserved.