/** * Adds a "serialVersionUID" field to the {@link ItdTypeDetailsBuilder} if * the governor doesn't already contain it. */ private void addSerialVersionUIDFieldIfRequired() { if (!governorTypeDetails.declaresField(SERIAL_VERSION_FIELD)) { builder.addField(createSerialVersionField()); } }
new ArrayList<AnnotationMetadataBuilder>(); annotations.add(new AnnotationMetadataBuilder(AUTOWIRED)); builder.addField(new FieldMetadataBuilder(getId(), 0, annotations, fieldSymbolName, collaboratorType)); fields.add(fieldSymbolName);
governorTypeDetails.getUniqueFieldName(field.getFieldName().getSymbolName() + "Keys"); builder.getImportRegistrationResolver().addImport(GAE_DATASTORE_KEY_FACTORY); builder.addField(getMultipleEntityIdField(hiddenIdFieldName)); } else { hiddenIdFieldName = governorTypeDetails.getUniqueFieldName(field.getFieldName().getSymbolName() + "Id"); builder.addField(getSingularEntityIdField(hiddenIdFieldName));
builder.addField(field);
/** * Ensures that the governor has provided field. You could indicates if * is necessary to generate the accessor and the mutator methods for this new field manually. * * @param FieldMetadataBuilder the field to include(required) * @since 2.0 */ protected final void ensureGovernorHasField(final FieldMetadataBuilder fieldMetadata, boolean includeAccessor, boolean includeMutator) { if (governorTypeDetails.getField(fieldMetadata.getFieldName()) == null) { builder.addField(fieldMetadata); } if (includeAccessor) { MethodMetadata accessorMethod = getAccessorMethod(fieldMetadata.build()); if (accessorMethod != null && governorTypeDetails.getMethod(accessorMethod.getMethodName()) == null) { builder.addMethod(accessorMethod); } } if (includeMutator) { MethodMetadata mutatorMethod = getMutatorMethod(fieldMetadata.build()); if (mutatorMethod != null && governorTypeDetails.getMethod(mutatorMethod.getMethodName()) == null) { builder.addMethod(mutatorMethod); } } }
/** * Adds a "serialVersionUID" field to the {@link ItdTypeDetailsBuilder} if * the governor doesn't already contain it. */ private void addSerialVersionUIDFieldIfRequired() { if (!governorTypeDetails.declaresField(SERIAL_VERSION_FIELD)) { builder.addField(createSerialVersionField()); } }
/** * Adds a "serialVersionUID" field to the {@link ItdTypeDetailsBuilder} if * the governor doesn't already contain it. */ private void addSerialVersionUIDFieldIfRequired() { if (!governorTypeDetails.declaresField(SERIAL_VERSION_FIELD)) { builder.addField(createSerialVersionField()); } }
new ArrayList<AnnotationMetadataBuilder>(); annotations.add(new AnnotationMetadataBuilder(AUTOWIRED)); builder.addField(new FieldMetadataBuilder(getId(), 0, annotations, fieldSymbolName, collaboratorType)); fields.add(fieldSymbolName);
private void addToBuilder(final FieldMetadataBuilder fieldBuilder) { final JavaSymbolName fieldName = fieldBuilder.getFieldName(); if (hasField(fieldName, fieldBuilder.buildAnnotations()) || hasFieldInItd(fieldName)) { return; } builder.addField(fieldBuilder); // Check for an existing accessor in the governor final JavaType fieldType = fieldBuilder.getFieldType(); builder.addMethod(getAccessorMethod(fieldName, fieldType)); // Check for an existing mutator in the governor builder.addMethod(getMutatorMethod(fieldName, fieldType)); }
governorTypeDetails.getUniqueFieldName(field.getFieldName().getSymbolName() + "Keys"); builder.getImportRegistrationResolver().addImport(GAE_DATASTORE_KEY_FACTORY); builder.addField(getMultipleEntityIdField(hiddenIdFieldName)); } else { hiddenIdFieldName = governorTypeDetails.getUniqueFieldName(field.getFieldName().getSymbolName() + "Id"); builder.addField(getSingularEntityIdField(hiddenIdFieldName));
builder.addField(getIdField()); builder.addMethod(getIdFieldGetter()); builder.addMethod(getIdFieldSetter()); builder.addField(getTimestampField()); builder.addMethod(getTimestampGetter()); builder.addMethod(getTimestampSetter()); builder.addField(getUserField()); builder.addMethod(getUserGetter()); builder.addMethod(getUserNameSetter());
/** * Ensures that the governor has provided field. You could indicates if * is necessary to generate the accessor and the mutator methods for this new field manually. * * @param FieldMetadataBuilder the field to include(required) * @since 2.0 */ protected final void ensureGovernorHasField(final FieldMetadataBuilder fieldMetadata, boolean includeAccessor, boolean includeMutator) { if (governorTypeDetails.getField(fieldMetadata.getFieldName()) == null) { builder.addField(fieldMetadata); } if (includeAccessor) { MethodMetadata accessorMethod = getAccessorMethod(fieldMetadata.build()); if (accessorMethod != null && governorTypeDetails.getMethod(accessorMethod.getMethodName()) == null) { builder.addMethod(accessorMethod); } } if (includeMutator) { MethodMetadata mutatorMethod = getMutatorMethod(fieldMetadata.build()); if (mutatorMethod != null && governorTypeDetails.getMethod(mutatorMethod.getMethodName()) == null) { builder.addMethod(mutatorMethod); } } }
builder.addField(getFieldAuditCreation()); builder.addMethod(getGetAuditCreationMethod()); builder.addMethod(getSetAuditCreationMethod()); builder.addField(getFieldAuditCreatedBy()); builder.addMethod(getGetAuditCreatedByMethod()); builder.addMethod(getSetAuditCreatedByMethod()); builder.addField(getFieldAuditLastUpdate()); builder.addMethod(getGetAuditLastUpdateMethod()); builder.addMethod(getSetAuditLastUpdateMethod()); builder.addField(getFieldAuditLastUpdatedBy()); builder.addMethod(getGetAuditLastUpdatedByMethod()); builder.addMethod(getSetAuditLastUpdatedByMethod());