public static String generateEntityName ( SQLiteDaoDefinition dao , SQLiteEntity entity ) { String entityName ; if ( entity == null ) { M2MEntity m2mEntity = M2MEntity . extractEntityManagedByDAO ( dao . getElement ( ) ) ; entityName = m2mEntity . getSimpleName ( ) ; } else { entityName = entity . getSimpleName ( ) ; } return entityName ; }
dao or entity can be null .