(new Column[]{ col }));
}
@Override
protected void parseMemberMappingAnnotations(FieldMetaData fmd) {
FieldMapping fm = (FieldMapping) fmd;
AnnotatedElement el = (AnnotatedElement) getRepository().
getMetaDataFactory().getDefaults().getBackingMember(fmd);
MappingTag tag;
for (Annotation anno : el.getDeclaredAnnotations()) {
tag = _tags.get(anno.annotationType());
if (tag == null) {
handleUnknownMemberMappingAnnotation(fm, anno);
continue;
}
switch (tag) {
case ASSOC_OVERRIDE:
parseAssociationOverrides(fm, (AssociationOverride) anno);
break;
case ASSOC_OVERRIDES:
parseAssociationOverrides(fm, ((AssociationOverrides) anno).
value());
break;
case ATTR_OVERRIDE:
parseAttributeOverrides(fm, (AttributeOverride) anno);
break;
case ATTR_OVERRIDES:
parseAttributeOverrides(fm, ((AttributeOverrides) anno).
value());
break;
case COL:
parseColumns(fm, (javax.persistence.Column) anno);
break;
case COLS:
parseColumns(fm, ((Columns) anno).value());
break;
case ENUMERATED:
parseEnumerated(fm, (Enumerated) anno);
break;
case JOIN_COL:
parseJoinColumns(fm, fm.getValueInfo(), true,
(JoinColumn) anno);
break;
case JOIN_COLS:
parseJoinColumns(fm, fm.getValueInfo(), true,
((JoinColumns) anno).value());
break;
case JOIN_TABLE:
parseJoinTable(fm, (JoinTable) anno);
break;
case PK_JOIN_COL:
parsePrimaryKeyJoinColumns(fm, (PrimaryKeyJoinColumn) anno);
break;
case PK_JOIN_COLS:
parsePrimaryKeyJoinColumns(fm,
((PrimaryKeyJoinColumns) anno).
value());
break;
case TABLE_GEN:
parseTableGenerator(el, (TableGenerator) anno);
break;
case TEMPORAL:
parseTemporal(fm, (Temporal) anno);
break;
case CLASS_CRIT:
fm.getValueInfo().setUseClassCriteria
(((ClassCriteria) anno).value());
break;
case CONTAINER_TABLE:
parseContainerTable(fm, (ContainerTable) anno);
break;
case EAGER_FETCH_MODE:
fm.setEagerFetchMode(toEagerFetchModeConstant
(((EagerFetchMode) anno).value()));
break;
case ELEM_CLASS_CRIT:
fm.getElementMapping().getValueInfo().setUseClassCriteria
(((ElementClassCriteria) anno).value());
break;
case ELEM_FK:
ElementForeignKey efk = (ElementForeignKey) anno;
parseForeignKey(fm.getElementMapping().getValueInfo(),
efk.name(), efk.enabled(), efk.deferred(),
efk.deleteAction(), efk.updateAction());
break;
case ELEM_INDEX:
ElementIndex eidx = (ElementIndex) anno;
parseIndex(fm.getElementMapping().getValueInfo(),
eidx.name(), eidx.enabled(), eidx.unique());
break;
case ELEM_JOIN_COL:
parseElementJoinColumns(fm, (ElementJoinColumn) anno);
break;
case ELEM_JOIN_COLS:
parseElementJoinColumns(fm, ((ElementJoinColumns) anno).
value());
break;
case ELEM_NONPOLY:
fm.getElementMapping().setPolymorphic(toPolymorphicConstant
(((ElementNonpolymorphic) anno).value()));
break;
case EMBEDDED_MAPPING:
parseEmbeddedMapping(fm, (EmbeddedMapping) anno);
break;
case FK:
parseForeignKey(fm.getValueInfo(), (ForeignKey) anno);
break;
case INDEX:
parseIndex(fm.getValueInfo(), (Index) anno);
break;
case NONPOLY:
fm.setPolymorphic(toPolymorphicConstant
(((Nonpolymorphic) anno).value()));
break;
case ORDER_COL:
parseOrderColumn(fm, (OrderColumn) anno);
break;
case STRAT:
fm.getValueInfo().setStrategy(((Strategy) anno).value());
break;
case UNIQUE:
parseUnique(fm,
(org.apache.openjpa.persistence.jdbc.Unique) anno);
break;
case X_JOIN_COL:
parseXJoinColumns(fm, fm.getValueInfo(), true,
(XJoinColumn) anno);
break;
case X_JOIN_COLS:
parseXJoinColumns(fm, fm.getValueInfo(), true,
((XJoinColumns) anno).value());
break;
default:
throw new UnsupportedException(_loc.get("unsupported", fm,
anno.toString()));