ulting.orcas.orcas-domainextension-extenions.8.6.4.source-code.ReverseExtension21FkGenIdx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orcas-domainextension-extenions Show documentation
Show all versions of orcas-domainextension-extenions Show documentation
orcas custom extensions (contains only support classes and an empty-extension). If custom-extensions are provided, there will be a custom artifact.
The newest version!
package de.opitzconsulting.orcas.extensions;
import java.util.ArrayList;
import de.opitzconsulting.orcas.extensions.OrcasBaseExtensionWithParameter;
import de.opitzconsulting.orcasDsl.Index;
import de.opitzconsulting.orcasDsl.IndexOrUniqueKey;
import de.opitzconsulting.orcasDsl.Model;
import de.opitzconsulting.orcasDsl.ModelElement;
import de.opitzconsulting.orcasDsl.Table;
public class ReverseExtension21FkGenIdx extends OrcasBaseExtensionWithParameter implements OrcasReverseExtension
{
@Override
public Model transformModel( Model pModel )
{
for( ModelElement lModelElement : new ArrayList( pModel.getModel_elements() ) )
{
if( lModelElement instanceof Table )
{
Table lTable = (Table)lModelElement;
for( IndexOrUniqueKey lIndexOrUniqueKey : new ArrayList( lTable.getInd_uks() ) )
{
if( lIndexOrUniqueKey instanceof Index )
{
Index lIndex = (Index)lIndexOrUniqueKey;
if( lIndex.getConsName().endsWith( "_GEN_IX" ) )
{
lTable.getInd_uks().remove( lIndex );
}
}
}
}
}
return pModel;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy