{
if ( !this.mappedClasses.contains( c.implClass.binaryName() ) )
{
boolean mapped = false;
Entity entity = null;
if ( c.target.getCustomizations().find( ORM_NS, "entity" ) != null )
{
final CPluginCustomization pc = c.target.getCustomizations().find( ORM_NS, "entity" );
entity = JAXB.unmarshal( new DOMSource( pc.element ), Entity.class );
orm.getEntity().add( entity );
this.toEntity( outline, c, entity );
mapped = true;
if ( !pc.isAcknowledged() )
{
pc.markAsAcknowledged();
}
}
if ( !mapped )
{
// Defaults to create an entity per class.
entity = new Entity();
String name = c.implClass.binaryName();
entity.setClazz( name );
final String pkgName = c.implClass.getPackage().name();
if ( pkgName != null && pkgName.length() > 0 )
{
name = name.substring( pkgName.length() + 1 );
}
entity.setName( name );
orm.getEntity().add( entity );
this.toEntity( outline, c, entity );
mapped = true;
}
this.mappedClasses.add( entity.getClazz() );
}
}