org.babyfish.jimmer.sql.association.meta.AssociationProp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql Show documentation
Show all versions of jimmer-sql Show documentation
A revolutionary ORM framework for both java and kotlin
The newest version!
package org.babyfish.jimmer.sql.association.meta;
import org.babyfish.jimmer.jackson.Converter;
import org.babyfish.jimmer.jackson.ConverterMetadata;
import org.babyfish.jimmer.lang.Ref;
import org.babyfish.jimmer.meta.*;
import org.babyfish.jimmer.sql.DissociateAction;
import org.babyfish.jimmer.sql.ManyToOne;
import org.babyfish.jimmer.sql.TargetTransferMode;
import org.babyfish.jimmer.sql.association.Association;
import org.babyfish.jimmer.sql.meta.*;
import org.jetbrains.annotations.NotNull;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
public abstract class AssociationProp implements ImmutableProp {
final AssociationType declaringType;
AssociationProp(AssociationType declaringType) {
this.declaringType = declaringType;
}
@Override
public @NotNull AssociationType getDeclaringType() {
return declaringType;
}
@Override
public @NotNull ImmutablePropCategory getCategory() {
return ImmutablePropCategory.REFERENCE;
}
@NotNull
@Override
public Class> getReturnClass() {
return getElementClass();
}
@NotNull
@Override
public Type getGenericType() {
return getElementClass();
}
@Override
public @NotNull DissociateAction getDissociateAction() {
return DissociateAction.NONE;
}
@Override
public boolean isEmbedded(EmbeddedLevel level) {
return level.hasReference() && getTargetType().getIdProp().isEmbedded(EmbeddedLevel.SCALAR);
}
@Override
public boolean isAssociation(TargetLevel level) {
return true;
}
@Override
public boolean isReference(TargetLevel level) {
return true;
}
@Override
public boolean isScalar(TargetLevel level) {
return false;
}
@Override
public boolean isScalarList() {
return false;
}
@Override
public boolean isReferenceList(TargetLevel level) {
return false;
}
@Override
public boolean isNullable() {
return false;
}
@Override
public boolean isInputNotNull() {
return true;
}
@Override
public boolean isMutable() {
return true;
}
@Override
public Annotation getAssociationAnnotation() {
return null;
}
@Override
public Class extends Annotation> getPrimaryAnnotationType() {
return ManyToOne.class;
}
@Override
public TargetTransferMode getTargetTransferMode() {
return TargetTransferMode.AUTO;
}
@Override
public boolean isTransient() {
return false;
}
@Override
public boolean hasTransientResolver() {
return false;
}
@Override
public boolean isFormula() {
return false;
}
@Override
public boolean isTargetForeignKeyReal(MetadataStrategy strategy) {
return true;
}
@Override
public S getStorage(MetadataStrategy strategy) {
return null;
}
@Override
public SqlTemplate getSqlTemplate() {
return null;
}
@Override
public boolean isView() {
return false;
}
@Override
public ImmutableProp getIdViewProp() {
return null;
}
@Override
public ImmutableProp getIdViewBaseProp() {
return null;
}
@Override
public ImmutableProp getManyToManyViewBaseProp() {
return null;
}
@Override
public ImmutableProp getManyToManyViewBaseDeeperProp() {
return null;
}
@Override
public ConverterMetadata getConverterMetadata() {
return null;
}
@Override
public Converter getConverter() {
return null;
}
@Override
public Converter getConverter(boolean forList) {
return null;
}
@Override
public Converter getAssociatedIdConverter(boolean forList) {
return null;
}
@Override
public LogicalDeletedValueGenerator> getLogicalDeletedValueGenerator(SqlContext sqlContext) {
return null;
}
@Override
public boolean isId() {
return false;
}
@Override
public boolean isVersion() {
return false;
}
@Override
public boolean isLogicalDeleted() {
return false;
}
@Override
public ImmutableProp getMappedBy() {
return null;
}
@Override
public ImmutableProp getOpposite() {
return null;
}
@Override
public ImmutableProp getReal() {
return this;
}
@Override
public List getDependencies() {
return Collections.emptyList();
}
@Override
public List getPropsDependOnSelf() {
return Collections.emptyList();
}
@Override
public Ref