public static EntitySet getEntitySetByEntityTypeName ( EntityDataModel entityDataModel , String entityTypeName ) throws ODataEdmException { for ( EntitySet entitySet : entityDataModel . getEntityContainer ( ) . getEntitySets ( ) ) { if ( entitySet . getTypeName ( ) . equals ( entityTypeName ) ) { return entitySet ; } } throw new ODataSystemException ( "Entity set not found in the entity data model for type: " + entityTypeName ) ; }
Get the Entity Set for a given Entity Type name through the Entity Data Model .