javax.persistence.AttributeOverrides Java Examples
The following examples show how to use
javax.persistence.AttributeOverrides.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JPAOverriddenAnnotationReader.java From lams with GNU General Public License v2.0 | 6 votes |
/** * @param mergeWithAnnotations Whether to use Java annotations for this * element, if present and not disabled by the XMLContext defaults. * In some contexts (such as an association mapping) merging with * annotations is never allowed. */ private AttributeOverrides mergeAttributeOverrides(XMLContext.Default defaults, List<AttributeOverride> attributes, boolean mergeWithAnnotations) { if ( mergeWithAnnotations && defaults.canUseJavaAnnotations() ) { AttributeOverride annotation = getPhysicalAnnotation( AttributeOverride.class ); addAttributeOverrideIfNeeded( annotation, attributes ); AttributeOverrides annotations = getPhysicalAnnotation( AttributeOverrides.class ); if ( annotations != null ) { for ( AttributeOverride current : annotations.value() ) { addAttributeOverrideIfNeeded( current, attributes ); } } } if ( attributes.size() > 0 ) { AnnotationDescriptor ad = new AnnotationDescriptor( AttributeOverrides.class ); ad.setValue( "value", attributes.toArray( new AttributeOverride[attributes.size()] ) ); return AnnotationFactory.create( ad ); } else { return null; } }
Example #2
Source File: MapBinder.java From lams with GNU General Public License v2.0 | 6 votes |
private boolean mappingDefinedAttributeOverrideOnMapKey(XProperty property) { if ( property.isAnnotationPresent( AttributeOverride.class ) ) { return namedMapKey( property.getAnnotation( AttributeOverride.class ) ); } if ( property.isAnnotationPresent( AttributeOverrides.class ) ) { final AttributeOverrides annotations = property.getAnnotation( AttributeOverrides.class ); for ( AttributeOverride attributeOverride : annotations.value() ) { if ( namedMapKey( attributeOverride ) ) { return true; } } } return false; }
Example #3
Source File: DbUtil.java From cosmic with Apache License 2.0 | 6 votes |
public static final AttributeOverride[] getAttributeOverrides(final AnnotatedElement ae) { AttributeOverride[] overrides = null; final AttributeOverrides aos = ae.getAnnotation(AttributeOverrides.class); if (aos != null) { overrides = aos.value(); } if (overrides == null || overrides.length == 0) { final AttributeOverride override = ae.getAnnotation(AttributeOverride.class); if (override != null) { overrides = new AttributeOverride[1]; overrides[0] = override; } else { overrides = new AttributeOverride[0]; } } return overrides; }
Example #4
Source File: DbUtil.java From cloudstack with Apache License 2.0 | 6 votes |
public static final AttributeOverride[] getAttributeOverrides(AnnotatedElement ae) { AttributeOverride[] overrides = null; AttributeOverrides aos = ae.getAnnotation(AttributeOverrides.class); if (aos != null) { overrides = aos.value(); } if (overrides == null || overrides.length == 0) { AttributeOverride override = ae.getAnnotation(AttributeOverride.class); if (override != null) { overrides = new AttributeOverride[1]; overrides[0] = override; } else { overrides = new AttributeOverride[0]; } } return overrides; }
Example #5
Source File: ViewRiksdagenOrgDocumentDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link RiksdagenDocumentOrgSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "publicDate", column = @Column(name = "EMBEDDED_ID_PUBLIC_DATE")), @AttributeOverride(name = "org", column = @Column(name = "EMBEDDED_ID_ORG")) }) public RiksdagenDocumentOrgSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #6
Source File: WorldBankData.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the country. * * @return the country */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "COUNTRY_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "COUNTRY_ID")) }) public Country getCountry() { return country; }
Example #7
Source File: ViewRiksdagenDocumentTypeDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link RiksdagenDocumentTypeSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "publicDate", column = @Column(name = "EMBEDDED_ID_PUBLIC_DATE")), @AttributeOverride(name = "documentType", column = @Column(name = "EMBEDDED_ID_DOCUMENT_TYPE")) }) public RiksdagenDocumentTypeSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #8
Source File: ViewRiksdagenPartyDocumentDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link RiksdagenDocumentPartySummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "publicDate", column = @Column(name = "EMBEDDED_ID_PUBLIC_DATE")), @AttributeOverride(name = "partyShortCode", column = @Column(name = "EMBEDDED_ID_PARTY_SHORT_CODE")), @AttributeOverride(name = "documentType", column = @Column(name = "EMBEDDED_ID_DOCUMENT_TYPE")) }) public RiksdagenDocumentPartySummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #9
Source File: ViewApplicationActionEventPageModeWeeklySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageModePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "pageMode", column = @Column(name = "EMBEDDED_ID_PAGE_MODE")) }) public ApplicationActionEventPageModePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #10
Source File: ViewApplicationActionEventPageElementAnnualSummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageElementPeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "elementId", column = @Column(name = "EMBEDDED_ID_ELEMENT_ID")) }) public ApplicationActionEventPageElementPeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #11
Source File: ViewApplicationActionEventPageHourlySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPagePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")) }) public ApplicationActionEventPagePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #12
Source File: ViewApplicationActionEventPageAnnualSummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPagePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")) }) public ApplicationActionEventPagePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #13
Source File: ViewApplicationActionEventPageModeAnnualSummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageModePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "pageMode", column = @Column(name = "EMBEDDED_ID_PAGE_MODE")) }) public ApplicationActionEventPageModePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #14
Source File: ViewApplicationActionEventPageWeeklySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPagePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")) }) public ApplicationActionEventPagePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #15
Source File: ViewWorldbankIndicatorDataCountrySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link WorldbankIndicatorDataCountrySummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "indicatorId", column = @Column(name = "EMBEDDED_ID_INDICATOR_ID")), @AttributeOverride(name = "countryId", column = @Column(name = "EMBEDDED_ID_COUNTRY_ID")) }) public WorldbankIndicatorDataCountrySummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #16
Source File: ViewApplicationActionEventPageModeDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageModePeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "pageMode", column = @Column(name = "EMBEDDED_ID_PAGE_MODE")) }) public ApplicationActionEventPageModePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #17
Source File: ViewApplicationActionEventPageElementWeeklySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageElementPeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "elementId", column = @Column(name = "EMBEDDED_ID_ELEMENT_ID")) }) public ApplicationActionEventPageElementPeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #18
Source File: ViewApplicationActionEventPageElementDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageElementPeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "elementId", column = @Column(name = "EMBEDDED_ID_ELEMENT_ID")) }) public ApplicationActionEventPageElementPeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #19
Source File: ViewRiksdagenPoliticianDocumentDailySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link RiksdagenDocumentPersonSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "publicDate", column = @Column(name = "EMBEDDED_ID_PUBLIC_DATE")), @AttributeOverride(name = "personId", column = @Column(name = "EMBEDDED_ID_PERSON_ID")), @AttributeOverride(name = "documentType", column = @Column(name = "EMBEDDED_ID_DOCUMENT_TYPE")) }) public RiksdagenDocumentPersonSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #20
Source File: WorldBankData.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the indicator. * * @return the indicator */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "INDICATOR_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "INDICATOR_ID")) }) public Indicator getIndicator() { return indicator; }
Example #21
Source File: ViewApplicationActionEventPageElementHourlySummary.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the value of the embeddedId property. * * @return * possible object is * {@link ApplicationActionEventPageElementPeriodSummaryEmbeddedId } * */ @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")), @AttributeOverride(name = "elementId", column = @Column(name = "EMBEDDED_ID_ELEMENT_ID")) }) public ApplicationActionEventPageElementPeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
Example #22
Source File: CountryElement.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the region. * * @return the region */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "REGION_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "REGION_ID")) }) public Region getRegion() { return region; }
Example #23
Source File: CountryElement.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the adminregion. * * @return the adminregion */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "ADMINREGION_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "ADMINREGION_ID")) }) public Adminregion getAdminregion() { return adminregion; }
Example #24
Source File: CountryElement.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the income level. * * @return the income level */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "INCOME_LEVEL_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "INCOME_LEVEL_ID")) }) public IncomeLevel getIncomeLevel() { return incomeLevel; }
Example #25
Source File: CountryElement.java From cia with Apache License 2.0 | 5 votes |
/** * Gets the lending type. * * @return the lending type */ @Embedded @AttributeOverrides({ @AttributeOverride(name = "value", column = @Column(name = "LENDING_TYPE_VALUE")), @AttributeOverride(name = "id", column = @Column(name = "LENDING_TYPE_ID")) }) public LendingType getLendingType() { return lendingType; }
Example #26
Source File: PublisherAssertion.java From juddi with Apache License 2.0 | 5 votes |
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "fromKey", column = @Column(name = "from_key", nullable = false, length = 255)), @AttributeOverride(name = "toKey", column = @Column(name = "to_key", nullable = false, length = 255))}) public PublisherAssertionId getId() { return this.id; }
Example #27
Source File: NominalLabelEvaluationData.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "documentId", column = @Column(name = "documentID", nullable = false)), @AttributeOverride(name = "crisisId", column = @Column(name = "crisisID", nullable = false)), @AttributeOverride(name = "nominalLabelId", column = @Column(name = "nominalLabelID", nullable = false)), @AttributeOverride(name = "nominalAttributeId", column = @Column(name = "nominalAttributeID", nullable = false)), @AttributeOverride(name = "wordFeatures", column = @Column(name = "wordFeatures", length = 65535)) }) public NominalLabelEvaluationDataId getId() { return this.id; }
Example #28
Source File: NominalLabelTrainingData.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "documentId", column = @Column(name = "documentID", nullable = false)), @AttributeOverride(name = "crisisId", column = @Column(name = "crisisID", nullable = false)), @AttributeOverride(name = "nominalLabelId", column = @Column(name = "nominalLabelID", nullable = false)), @AttributeOverride(name = "nominalAttributeId", column = @Column(name = "nominalAttributeID", nullable = false)), @AttributeOverride(name = "wordFeatures", column = @Column(name = "wordFeatures", length = 65535)) }) public NominalLabelTrainingDataId getId() { return this.id; }
Example #29
Source File: TaskAssignment.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "documentId", column = @Column(name = "documentID", nullable = false)), @AttributeOverride(name = "userId", column = @Column(name = "userID", nullable = false)) }) public TaskAssignmentId getId() { return this.id; }
Example #30
Source File: DocumentNominalLabel.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "documentId", column = @Column(name = "documentID", nullable = false)), @AttributeOverride(name = "nominalLabelId", column = @Column(name = "nominalLabelID", nullable = false)), @AttributeOverride(name = "userId", column = @Column(name = "userID", nullable = false)) }) public DocumentNominalLabelId getId() { return this.id; }