{
if ( a.getId().isEmpty() )
{
if ( c.getSuperClass() != null )
{
final Attributes attr = getAttributes( orm, c.getSuperClass().implClass.binaryName() );
recurseAddId( orm, attr, c.getSuperClass() );
}
else
{
final Id id = new Id();
final GeneratedValue gv = new GeneratedValue();
final Column col = new Column();
a.getId().add( id );
gv.setStrategy( GenerationType.AUTO );
col.setScale( 0 );
col.setPrecision( 20 );
col.setNullable( false );
id.setName( "jpaId" );
id.setGeneratedValue( gv );
id.setColumn( col );
generateProperty( id.getName(), Long.TYPE, c );
}
}
}
void recurseAddVersion( final EntityMappings orm, final Attributes a, final ClassOutline c )
{
if ( a.getVersion().isEmpty() )
{
if ( c.getSuperClass() != null )
{
final Attributes attr = getAttributes( orm, c.getSuperClass().implClass.binaryName() );
if ( attr != null )
{
this.recurseAddVersion( orm, attr, c.getSuperClass() );
}
}