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

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

public class LinkedHibernateImpl
extends AbstractWrapper
implements Linked

Hibernate annotation implementation of Linked.

Author:
David Bernhard (DBD)
File-location:
LinkedHibernateImpl
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Field Summary
 
Fields inherited from class ch.elca.el4j.util.objectwrapper.impl.AbstractWrapper
m_target, m_wrapper
 
Constructor Summary
LinkedHibernateImpl(SessionFactory sessionFactory)
          Create the implementation.
 
Method Summary
 void create()
          Override this in implementations to instantiate an object.
 Object[] getAllLinked()
          Convenience method that returns all linked objects regardless of their location.
 Collection<?> getCollectionLinkByName(String name)
          Get a collection of links by name.
 String[] getCollectionLinkNames()
          
 Object getlinkByName(String linkName)
          Get a linked object by name.
 String[] getLinkNames()
          
 
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

LinkedHibernateImpl

public LinkedHibernateImpl(SessionFactory sessionFactory)
Create the implementation.

Parameters:
sessionFactory - The session factory.
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

getAllLinked

public Object[] getAllLinked()
Convenience method that returns all linked objects regardless of their location.

Specified by:
getAllLinked in interface Linked
Returns:
All linked objects.

getCollectionLinkByName

public Collection<?> getCollectionLinkByName(String name)
Get a collection of links by name.

Specified by:
getCollectionLinkByName in interface Linked
Parameters:
name - The collection link name.
Returns:
The collection.

getCollectionLinkNames

public String[] getCollectionLinkNames()

Specified by:
getCollectionLinkNames in interface Linked
Returns:
The names of all collection links this object has.

getLinkNames

public String[] getLinkNames()

Specified by:
getLinkNames in interface Linked
Returns:
The names of all (simple) links this object has.

getlinkByName

public Object getlinkByName(String linkName)
Get a linked object by name.

Specified by:
getlinkByName in interface Linked
Parameters:
linkName - The link name (from getLinkNames).
Returns:
The linked object.


Copyright © 2005-2011 ELCA. All Rights Reserved.