/** * 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; }
/** * @param <T> * @param entityClass * @return */ public static <T extends GenericFactory<Z>, Z> T factory(Class<Z> entityClass) { return (T) factory(Roma.schema().getSchemaClass(entityClass)); }
/** * 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)); }
/** * 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)); }