// We need to be informed if our dependent metadata changes
metadataDependencyRegistry.registerDependency(
persistenceMemberHoldingTypeDetails.getDeclaredByMetadataId(),
metadataIdentificationString);
final MethodParameter firstResultParameter = new MethodParameter(
INT_PRIMITIVE, "firstResult");
final MethodParameter maxResultsParameter = new MethodParameter(
INT_PRIMITIVE, "maxResults");
final MethodMetadata identifierAccessorMethod = memberDetails
.getMostConcreteMethodWithTag(IDENTIFIER_ACCESSOR_METHOD);
final MethodMetadata versionAccessorMethod = persistenceMemberLocator
.getVersionAccessor(entity);
final MemberTypeAdditions countMethodAdditions = layerService
.getMemberTypeAdditions(metadataIdentificationString,
COUNT_ALL_METHOD.name(), entity, identifierType,
LAYER_POSITION);
final MemberTypeAdditions findMethodAdditions = layerService
.getMemberTypeAdditions(metadataIdentificationString,
FIND_METHOD.name(), entity, identifierType,
LAYER_POSITION, new MethodParameter(identifierType,
"id"));
final MemberTypeAdditions findAllMethodAdditions = layerService
.getMemberTypeAdditions(metadataIdentificationString,
FIND_ALL_METHOD.name(), entity, identifierType,
LAYER_POSITION);
final MemberTypeAdditions findEntriesMethod = layerService
.getMemberTypeAdditions(metadataIdentificationString,
FIND_ENTRIES_METHOD.name(), entity, identifierType,
LAYER_POSITION, firstResultParameter,
maxResultsParameter);
final MethodParameter entityParameter = new MethodParameter(entity,
"obj");
final MemberTypeAdditions flushMethodAdditions = layerService
.getMemberTypeAdditions(metadataIdentificationString,
FLUSH_METHOD.name(), entity, identifierType,
LAYER_POSITION, entityParameter);