-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8eb6b32
commit 6b596e5
Showing
14 changed files
with
156 additions
and
194 deletions.
There are no files selected for viewing
125 changes: 117 additions & 8 deletions
125
core/src/main/java/dev/morphia/mapping/codec/pojo/critter/CritterEntityModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,132 @@ | ||
package dev.morphia.mapping.codec.pojo.critter; | ||
|
||
import java.lang.annotation.Annotation; | ||
import java.lang.reflect.Type; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import dev.morphia.annotations.Entity; | ||
import dev.morphia.mapping.Mapper; | ||
import dev.morphia.mapping.codec.MorphiaInstanceCreator; | ||
import dev.morphia.mapping.codec.pojo.EntityModel; | ||
import dev.morphia.mapping.codec.pojo.PropertyModel; | ||
import dev.morphia.mapping.codec.pojo.TypeData; | ||
|
||
/** | ||
* 0 | ||
* | ||
* @hidden | ||
* @morphia.internal | ||
*/ | ||
@SuppressWarnings("NullableProblems") | ||
public abstract class CritterEntityModel extends EntityModel { | ||
private Entity entityAnnotation; | ||
protected final Mapper mapper; | ||
protected Entity entityAnnotation; | ||
|
||
public CritterEntityModel(Mapper mapper, Class<?> type) { | ||
super(mapper, type); | ||
super(type); | ||
this.mapper = mapper; | ||
} | ||
|
||
@Override | ||
public abstract Set<Class<?>> classHierarchy(); | ||
|
||
@Override | ||
public final void discriminator(String discriminator) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public final EntityModel discriminatorKey(String discriminatorKey) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public Entity getEntityAnnotation() { | ||
if (entityAnnotation == null) { | ||
entityAnnotation = entityAnnotation(); | ||
} | ||
return entityAnnotation; | ||
public final EntityModel discriminatorEnabled(boolean discriminatorEnabled) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
protected abstract Entity entityAnnotation(); | ||
@Override | ||
public abstract String collectionName(); | ||
|
||
@Override | ||
public final EntityModel collectionName(String collectionName) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public abstract List<PropertyModel> getShardKeys(); | ||
|
||
@Override | ||
public abstract String discriminator(); | ||
|
||
@Override | ||
public abstract String discriminatorKey(); | ||
|
||
@Override | ||
public abstract Entity getEntityAnnotation(); | ||
|
||
@Override | ||
public abstract PropertyModel getIdProperty(); | ||
|
||
@Override | ||
public final void setIdProperty(PropertyModel model) { | ||
|
||
} | ||
|
||
@Override | ||
public abstract MorphiaInstanceCreator getInstanceCreator(); | ||
|
||
@Override | ||
public abstract List<PropertyModel> getProperties(Class<? extends Annotation> type); | ||
|
||
@Override | ||
public abstract List<PropertyModel> getProperties(); | ||
|
||
@Override | ||
public final PropertyModel getProperty(String name) { | ||
return super.getProperty(name); | ||
} | ||
|
||
@Override | ||
public abstract EntityModel getSubtype(Class<?> type); | ||
|
||
@Override | ||
public abstract Set<EntityModel> getSubtypes(); | ||
|
||
@Override | ||
public abstract void addSubtype(EntityModel subtype); | ||
|
||
@Override | ||
public abstract EntityModel getSuperClass(); | ||
|
||
@Override | ||
public abstract Class<?> getType(); | ||
|
||
@Override | ||
public final void setType(Class<?> type) { | ||
} | ||
|
||
@Override | ||
public abstract TypeData<?> getTypeData(Class<?> type, TypeData<?> suggested, Type genericType); | ||
|
||
@Override | ||
public abstract PropertyModel getVersionProperty(); | ||
|
||
@Override | ||
public final void setVersionProperty(PropertyModel model) { | ||
|
||
} | ||
|
||
@Override | ||
public abstract boolean hasLifecycle(Class<? extends Annotation> type); | ||
|
||
@Override | ||
public abstract boolean isAbstract(); | ||
|
||
@Override | ||
public abstract boolean isInterface(); | ||
|
||
@Override | ||
public abstract boolean useDiscriminator(); | ||
} |
131 changes: 0 additions & 131 deletions
131
critter/core/src/main/kotlin/dev/morphia/critter/CritterEntityModel.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
critter/core/src/main/kotlin/dev/morphia/critter/parser/CritterAsmGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
critter/core/src/main/kotlin/dev/morphia/critter/parser/CritterGizmoGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.