EntityInfrastructureBuilder

public interface EntityInfrastructureBuilder

The EntityInfrastructureBuilder is responsible for building infrastructure for a given entity: repository, interface and service classes.

Methods

buildHistoryInfrastructure

List<ClassData> buildHistoryInfrastructure(String className)

Builds the repository, interface and implementation of this interface classes for the given history class. The names for classes are generated by org.motechproject.mds.util.ClassName.getRepositoryName(String), org.motechproject.mds.util.ClassName.getInterfaceName(String), org.motechproject.mds.util.ClassName.getServiceName(String), respectively.

Parameters:
  • className – a name of history class.
Returns:

a list of classes that represents infrastructure for the history class.

buildInfrastructure

List<ClassData> buildInfrastructure(Entity entity)

Builds the repository, interface and implementation of this interface classes for the given entity. The names for classes are generated by org.motechproject.mds.util.ClassName.getRepositoryName(String), org.motechproject.mds.util.ClassName.getInterfaceName(String), org.motechproject.mds.util.ClassName.getServiceName(String), respectively.

Parameters:
Returns:

a list of classes that represents infrastructure for the given entity.