public static Singleton getAndCheckSingleton ( EntityDataModel entityDataModel , String singletonName ) { Singleton singleton = entityDataModel . getEntityContainer ( ) . getSingleton ( singletonName ) ; if ( singleton == null ) { throw new ODataSystemException ( "Singleton not found in the entity data model: " + singletonName ) ; } return singleton ; }
Gets the singleton with the specified name throws an exception if no singleton with the specified name exists .