return discriminatorColumnName;
}
@SuppressWarnings("unchecked")
public MetaClassSingle<?> findOrCreate(Class<?> clazz, Class<?> parent) {
NoSqlDiscriminatorColumn col = clazz.getAnnotation(NoSqlDiscriminatorColumn.class);
if(col == null)
throw new IllegalArgumentException("Class "+parent.getName()+" in the NoSqlInheritance annotation, specifies a class" +
" that is missing the NoSqlDiscriminatorColumn annotation. Class to add annotation to="+clazz.getName());
else if(!parent.isAssignableFrom(clazz))
throw new IllegalArgumentException("Class "+clazz+" is not a subclass of "+parent+" but the" +
" NoSqlInheritance annotation specifies that class so it needs to be a subclass");
String columnValue = col.value();
MetaClassSingle<T> metaSingle = dbTypeToMeta.get(columnValue);
if(metaSingle != null)
return metaSingle;
metaSingle = classMetaProvider.get();