} else if (accessibleObject.isId(this) && ! accessibleObject.isDerivedId(this)) {
return new IdAccessor(accessibleObject.getAnnotation(Id.class), accessibleObject, this);
} else if (accessibleObject.isDerivedIdClass(this)) {
return new DerivedIdClassAccessor(accessibleObject, this);
} else if (accessibleObject.isBasic(this)) {
return new BasicAccessor(accessibleObject.getAnnotation(Basic.class), accessibleObject, this);
} else if (accessibleObject.isStructure(this)) {
return new StructureAccessor(accessibleObject.getAnnotation(Structure.class), accessibleObject, this);
} else if (accessibleObject.isEmbedded(this)) {
return new EmbeddedAccessor(accessibleObject.getAnnotation(Embedded.class), accessibleObject, this);
} else if (accessibleObject.isEmbeddedId(this)) {
return new EmbeddedIdAccessor(accessibleObject.getAnnotation(EmbeddedId.class), accessibleObject, this);
} else if (accessibleObject.isTransformation(this)) {
return new TransformationAccessor(accessibleObject.getAnnotation(Transformation.class), accessibleObject, this);
} else if (accessibleObject.isManyToMany(this)) {
return new ManyToManyAccessor(accessibleObject.getAnnotation(ManyToMany.class), accessibleObject, this);
} else if (accessibleObject.isManyToOne(this)) {
return new ManyToOneAccessor(accessibleObject.getAnnotation(ManyToOne.class), accessibleObject, this);
} else if (accessibleObject.isOneToMany(this)) {
// A OneToMany can default and doesn't require an annotation to be present.
return new OneToManyAccessor(accessibleObject.getAnnotation(OneToMany.class), accessibleObject, this);
} else if (accessibleObject.isOneToOne(this)) {
// A OneToOne can default and doesn't require an annotation to be present.
return new OneToOneAccessor(accessibleObject.getAnnotation(OneToOne.class), accessibleObject, this);
} else if (accessibleObject.isVariableOneToOne(this)) {
// A VariableOneToOne can default and doesn't require an annotation to be present.
return new VariableOneToOneAccessor(accessibleObject.getAnnotation(VariableOneToOne.class), accessibleObject, this);
} else if (excludeDefaultMappings()) {
return null;
} else {
// Default case (everything else falls into a Basic)
return new BasicAccessor(accessibleObject.getAnnotation(Basic.class), accessibleObject, this);
}
}