com.atlassian.bamboo.persistence3
Class AbstractDiscriminatorRegistry<T,X extends T>

java.lang.Object
  extended by com.atlassian.bamboo.persistence3.AbstractDiscriminatorRegistry<T,X>
Direct Known Subclasses:
PlanDiscriminatorRegistry, ResultsSummaryDiscriminatorRegistry

public abstract class AbstractDiscriminatorRegistry<T,X extends T>
extends java.lang.Object


Constructor Summary
AbstractDiscriminatorRegistry(bucket.core.persistence.hibernate.schema.SchemaHelper schemaHelper)
           
 
Method Summary
protected abstract  java.lang.Class<X> getBaseClass()
           
 java.lang.String getDiscriminatorForType(java.lang.Class<? extends T> aClass)
          Get the discriminator for the given Class.
 java.util.Set<java.lang.String> getDiscriminatorsForType(java.lang.Class<? extends T> aClass)
          Get the discriminators needed to lookup the given Class
 java.lang.Class<? extends T> getTypeForDiscriminator(java.lang.String discriminator)
           
 boolean isConcretelyMappedType(java.lang.Class<? extends T> aClass)
          Tests if the provided type is concretely mapped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDiscriminatorRegistry

public AbstractDiscriminatorRegistry(bucket.core.persistence.hibernate.schema.SchemaHelper schemaHelper)
                              throws net.sf.hibernate.HibernateException
Throws:
net.sf.hibernate.HibernateException
Method Detail

getBaseClass

protected abstract java.lang.Class<X> getBaseClass()

getDiscriminatorsForType

public java.util.Set<java.lang.String> getDiscriminatorsForType(java.lang.Class<? extends T> aClass)
Get the discriminators needed to lookup the given Class

Parameters:
aClass -
Returns:
discriminators

getDiscriminatorForType

public java.lang.String getDiscriminatorForType(java.lang.Class<? extends T> aClass)
Get the discriminator for the given Class.

Parameters:
aClass -
Returns:
discriminator

getTypeForDiscriminator

@Nullable
public java.lang.Class<? extends T> getTypeForDiscriminator(@NotNull
                                                                     java.lang.String discriminator)

isConcretelyMappedType

public boolean isConcretelyMappedType(java.lang.Class<? extends T> aClass)
Tests if the provided type is concretely mapped

Parameters:
aClass -
Returns:
true if the type is concretely mapped


Copyright © 2011 Atlassian. All Rights Reserved.