|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lambico.test.spring.hibernate.FixtureHelper
public class FixtureHelper
| Constructor Summary | |
|---|---|
protected |
FixtureHelper()
A default protected constructor. |
| Method Summary | |
|---|---|
static void |
eraseDbForModel(java.lang.Class model,
GenericDaoBase dao)
Erase the DB for a model. |
static java.lang.String |
getFixtureBusinessDaoId(java.lang.Class model)
Gets id of dao related to a model. |
static java.lang.String |
getFixtureDaoId(java.lang.Class model)
Gets id of dao related to a model. |
static java.lang.String |
getFixtureFileName(java.lang.Class model)
Gets file name of a fixture fragment related to a model. |
static java.lang.String |
getModelName(java.lang.Class model)
Gets human readable name of a model. |
static java.util.Map<java.lang.Class,java.lang.Object[]> |
loadFixturesFromResource(org.springframework.core.io.ClassPathResource fixtureDir,
java.util.Set<java.lang.Class> models)
Load the fixtures. |
static java.util.Map<java.lang.Class,java.lang.Object[]> |
loadFixturesFromResource(java.lang.String classpathResource,
java.util.Set<java.lang.Class> models)
Load the fixtures. |
static void |
populateDbForModel(java.lang.Class model,
java.lang.Object[] fixtures,
GenericDaoBase dao)
Populate the DB with the fixtures data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FixtureHelper()
| Method Detail |
|---|
public static java.lang.String getFixtureFileName(java.lang.Class model)
model - The class of a model.
public static java.lang.String getFixtureDaoId(java.lang.Class model)
DaoProvider daos = (DaoProvider)ctx.getBean(DAO_PROVIDER_ID);
GenericDao dao = (GenericDao)daos.getDao(clazz);
The DAO_PROVIDER_ID usually is "daos".
model - The class of a model.
public static java.lang.String getFixtureBusinessDaoId(java.lang.Class model)
DaoProvider daos = (DaoProvider)ctx.getBean(DAO_PROVIDER_ID);
GenericDao dao = (GenericDao)daos.getDao(clazz);
The DAO_PROVIDER_ID usually is "daos".
model - The class of a model.
public static java.lang.String getModelName(java.lang.Class model)
model - The class of a model.
public static java.util.Map<java.lang.Class,java.lang.Object[]> loadFixturesFromResource(java.lang.String classpathResource,
java.util.Set<java.lang.Class> models)
classpathResource - dir relative pathmodels - The set of models.
public static java.util.Map<java.lang.Class,java.lang.Object[]> loadFixturesFromResource(org.springframework.core.io.ClassPathResource fixtureDir,
java.util.Set<java.lang.Class> models)
fixtureDir - The directory where to search the fixtures.models - The set of models.
public static void populateDbForModel(java.lang.Class model,
java.lang.Object[] fixtures,
GenericDaoBase dao)
model - The model to populate.fixtures - The fixtures.dao - The DAO to use.
public static void eraseDbForModel(java.lang.Class model,
GenericDaoBase dao)
model - The model to erase.dao - The DAO tp use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||