org.spicefactory.pimento.metamodel.impl
Class ManagedTypeImpl

java.lang.Object
  extended by org.spicefactory.pimento.metamodel.impl.TypeImpl
      extended by org.spicefactory.pimento.metamodel.impl.ManagedTypeImpl
All Implemented Interfaces:
Externalizable, ManagedType, Type
Direct Known Subclasses:
EmbeddableImpl, EntityImpl

public class ManagedTypeImpl
extends TypeImpl
implements ManagedType

Default implementation of the ManagedType interface.

Author:
Jens Halm

Constructor Summary
ManagedTypeImpl(Class<?> type, List<ManagedProperty> properties)
          Creates a new instance.
 
Method Summary
 List<ManagedProperty> getProperties()
          Returns all managed properties of this persistent class.
 ManagedProperty getProperty(String name)
          Returns the managed property for the specified name or null if no such property exists.
 void writeExternal(DataOutput output)
          Saves the content of this object to the DataOutput instance.
 
Methods inherited from class org.spicefactory.pimento.metamodel.impl.TypeImpl
getJavaType, readExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.spicefactory.pimento.metamodel.Type
getJavaType
 

Constructor Detail

ManagedTypeImpl

public ManagedTypeImpl(Class<?> type,
                       List<ManagedProperty> properties)
Creates a new instance.

Parameters:
type - the Java type
properties - the managed properties of this persistent type
Method Detail

getProperties

public List<ManagedProperty> getProperties()
Description copied from interface: ManagedType
Returns all managed properties of this persistent class.

Specified by:
getProperties in interface ManagedType
Returns:
all managed properties of this persistent class

getProperty

public ManagedProperty getProperty(String name)
Description copied from interface: ManagedType
Returns the managed property for the specified name or null if no such property exists.

Specified by:
getProperty in interface ManagedType
Parameters:
name - the name of the property
Returns:
the managed property for the specified name

writeExternal

public void writeExternal(DataOutput output)
Description copied from interface: Externalizable
Saves the content of this object to the DataOutput instance.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class TypeImpl
Parameters:
output - the output to write to