public static boolean isSingletonEntity ( EntityDataModel entityDataModel , Object entity ) throws ODataEdmException { // Get the entity type EntityType entityType = getAndCheckEntityType ( entityDataModel , entity . getClass ( ) ) ; boolean isSingletonEntity = false ; for ( Singleton singleton : entityDataModel . getEntityContainer ( ) . getSingletons ( ) ) { if ( singleton . getTypeName ( ) . equals ( entityType . getFullyQualifiedName ( ) ) ) { isSingletonEntity = true ; break ; } } return isSingletonEntity ; }
Check if the given entity is a Singleton entity .