示例#1
0
 /**
  * Retrieve the repository (if defined) for a particular domain class.
  *
  * @param <T> the type of the object that will be returned
  * @param <Z> the type of domain class.
  * @param entityClass the {@link Class<Z>} of domain class.
  * @return the repository instance.
  */
 public static <Z, T extends GenericRepository<Z>> T repository(Class<Z> entityClass) {
   return entityClass != null ? (T) repository(Roma.schema().getSchemaClass(entityClass)) : null;
 }
示例#2
0
 /**
  * @param <T>
  * @param entityClass
  * @return
  */
 public static <T extends GenericFactory<Z>, Z> T factory(Class<Z> entityClass) {
   return (T) factory(Roma.schema().getSchemaClass(entityClass));
 }
示例#3
0
 /**
  * Retrieve the repository (if defined) for a particular domain class.
  *
  * @param <T> the type of the object that will be returned
  * @param <Z> the type of domain class.
  * @param entityClass the simple name of domain class.
  * @return the repository instance.
  */
 public static <T extends GenericRepository<?>> T repository(String entityClass) {
   return (T) repository(Roma.schema().getSchemaClass(entityClass));
 }
示例#4
0
 /**
  * returns a domain factory (if defined) for a particular domain class
  *
  * @param <T> the type of the object that will be returned
  * @param entityClass the class (simple) name of the domain class
  * @return a domain factory (if defined) for a particular domain class
  */
 public static <T extends GenericFactory<?>> T factory(String entityClass) {
   return (T) factory(Roma.schema().getSchemaClass(entityClass));
 }