org.tynamo.descriptor
Class TynamoClassDescriptorImpl

java.lang.Object
  extended by org.tynamo.descriptor.TynamoDescriptor
      extended by org.tynamo.descriptor.TynamoClassDescriptorImpl
All Implemented Interfaces:
Serializable, Cloneable, Descriptor, Extensible, TynamoClassDescriptor
Direct Known Subclasses:
EmbeddedDescriptor

public class TynamoClassDescriptorImpl
extends TynamoDescriptor
implements TynamoClassDescriptor

This represents all the Tynamo metadata for a single class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tynamo.descriptor.TynamoDescriptor
beanType, LOG
 
Constructor Summary
TynamoClassDescriptorImpl(Class beanType)
           
TynamoClassDescriptorImpl(TynamoClassDescriptor descriptor)
          This is a copy constructor.
TynamoClassDescriptorImpl(TynamoClassDescriptorImpl dto)
           
 
Method Summary
 Object clone()
           
 void copyFrom(Descriptor descriptor)
           
protected  void copyPropertyDescriptorsFrom(TynamoClassDescriptor descriptor)
           
 boolean getHasCyclicRelationships()
           
 TynamoPropertyDescriptor getIdentifierDescriptor()
           
 List<IMethodDescriptor> getMethodDescriptors()
           
 TynamoPropertyDescriptor getPropertyDescriptor(String name)
           
 List<TynamoPropertyDescriptor> getPropertyDescriptors()
           
 List<TynamoPropertyDescriptor> getPropertyDescriptors(List<String> properties)
           
 boolean isAllowRemove()
           
 boolean isAllowSave()
           
 boolean isChild()
           
 void setAllowRemove(boolean allowRemove)
           
 void setAllowSave(boolean allowSave)
           
 void setChild(boolean child)
           
 void setHasCyclicRelationships(boolean hasBidirectionalRelationship)
           
 void setMethodDescriptors(List<IMethodDescriptor> methodDescriptors)
           
 void setPropertyDescriptors(List<TynamoPropertyDescriptor> propertyDescriptors)
           
 String toString()
          Added toString method to help with unit testing debugging.
 
Methods inherited from class org.tynamo.descriptor.TynamoDescriptor
addExtension, addExtension, copyExtensionsFrom, getBeanType, getExtension, getExtension, getExtensions, getType, isNonVisual, removeExtension, removeExtension, setBeanType, setExtensions, setNonVisual, supportsExtension, supportsExtension
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tynamo.descriptor.TynamoClassDescriptor
getBeanType
 
Methods inherited from interface org.tynamo.descriptor.Descriptor
isNonVisual, setNonVisual
 
Methods inherited from interface org.tynamo.descriptor.extension.Extensible
addExtension, addExtension, getExtension, getExtension, getExtensions, removeExtension, removeExtension, supportsExtension, supportsExtension
 

Constructor Detail

TynamoClassDescriptorImpl

public TynamoClassDescriptorImpl(TynamoClassDescriptor descriptor)
This is a copy constructor. These need to be clonable for the security aspect to be able to copy them, so if new properties are added they should be added here too.


TynamoClassDescriptorImpl

public TynamoClassDescriptorImpl(Class beanType)

TynamoClassDescriptorImpl

public TynamoClassDescriptorImpl(TynamoClassDescriptorImpl dto)
Parameters:
dto -
Method Detail

copyPropertyDescriptorsFrom

protected void copyPropertyDescriptorsFrom(TynamoClassDescriptor descriptor)

getPropertyDescriptor

public TynamoPropertyDescriptor getPropertyDescriptor(String name)
Specified by:
getPropertyDescriptor in interface TynamoClassDescriptor
Returns:

getPropertyDescriptors

public List<TynamoPropertyDescriptor> getPropertyDescriptors(List<String> properties)
Specified by:
getPropertyDescriptors in interface TynamoClassDescriptor

getMethodDescriptors

public List<IMethodDescriptor> getMethodDescriptors()
Specified by:
getMethodDescriptors in interface TynamoClassDescriptor
Returns:
Returns the methodDescriptors.

setMethodDescriptors

public void setMethodDescriptors(List<IMethodDescriptor> methodDescriptors)
Specified by:
setMethodDescriptors in interface TynamoClassDescriptor
Parameters:
methodDescriptors - The methodDescriptors to set.

getPropertyDescriptors

public List<TynamoPropertyDescriptor> getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface TynamoClassDescriptor
Returns:
Returns the propertyDescriptors.

setPropertyDescriptors

public void setPropertyDescriptors(List<TynamoPropertyDescriptor> propertyDescriptors)
Specified by:
setPropertyDescriptors in interface TynamoClassDescriptor
Parameters:
propertyDescriptors - The propertyDescriptors to set.

getIdentifierDescriptor

public TynamoPropertyDescriptor getIdentifierDescriptor()
Specified by:
getIdentifierDescriptor in interface TynamoClassDescriptor

isChild

public boolean isChild()
Specified by:
isChild in interface TynamoClassDescriptor
Returns:
Returns the child.

setChild

public void setChild(boolean child)
Specified by:
setChild in interface TynamoClassDescriptor
Parameters:
child - The child to set.

clone

public Object clone()
Specified by:
clone in interface Descriptor
Overrides:
clone in class TynamoDescriptor

copyFrom

public void copyFrom(Descriptor descriptor)
Overrides:
copyFrom in class TynamoDescriptor

isAllowRemove

public boolean isAllowRemove()
Specified by:
isAllowRemove in interface TynamoClassDescriptor

setAllowRemove

public void setAllowRemove(boolean allowRemove)
Specified by:
setAllowRemove in interface TynamoClassDescriptor

isAllowSave

public boolean isAllowSave()
Specified by:
isAllowSave in interface TynamoClassDescriptor

setAllowSave

public void setAllowSave(boolean allowSave)
Specified by:
setAllowSave in interface TynamoClassDescriptor

getHasCyclicRelationships

public boolean getHasCyclicRelationships()
Specified by:
getHasCyclicRelationships in interface TynamoClassDescriptor

setHasCyclicRelationships

public void setHasCyclicRelationships(boolean hasBidirectionalRelationship)
Specified by:
setHasCyclicRelationships in interface TynamoClassDescriptor

toString

public String toString()
Added toString method to help with unit testing debugging.

Overrides:
toString in class Object


Copyright © 2004-2012. All Rights Reserved.