-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
192 additions
and
7 deletions.
There are no files selected for viewing
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
55 changes: 51 additions & 4 deletions
55
core/src/test/java/dev/morphia/test/mapping/codec/pojo/TypeDataTest.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
7 changes: 7 additions & 0 deletions
7
core/src/test/java/dev/morphia/test/mapping/codec/pojo/generics/FullHashMap.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.morphia.test.mapping.codec.pojo.generics; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public class FullHashMap extends PartialHashMap<LocalDateTime> { | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
core/src/test/java/dev/morphia/test/mapping/codec/pojo/generics/PartialHashMap.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.morphia.test.mapping.codec.pojo.generics; | ||
|
||
import java.util.HashMap; | ||
|
||
public class PartialHashMap<T> extends HashMap<String, T> { | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
core/src/test/java/dev/morphia/test/mapping/codec/pojo/generics/PartialList.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package dev.morphia.test.mapping.codec.pojo.generics; | ||
|
||
import java.util.ArrayList; | ||
import java.util.BitSet; | ||
|
||
public class PartialList extends ArrayList<BitSet> { | ||
} |
28 changes: 28 additions & 0 deletions
28
core/src/test/java/dev/morphia/test/mapping/codec/pojo/generics/Subtypes.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package dev.morphia.test.mapping.codec.pojo.generics; | ||
|
||
import java.util.List; | ||
import java.util.Locale; | ||
|
||
import dev.morphia.annotations.Entity; | ||
import dev.morphia.annotations.Id; | ||
import dev.morphia.annotations.PostPersist; | ||
|
||
import org.bson.Document; | ||
|
||
@Entity | ||
public class Subtypes { | ||
@Id | ||
public String id; | ||
public PartialHashMap<Integer> partialHashMap; | ||
public FullHashMap fullHashMap; | ||
public List<Locale> genericList; | ||
public PartialList partialList; | ||
public String name; | ||
public int age; | ||
|
||
@PostPersist | ||
public void pre(Document document) { | ||
System.out.println("document = " + document); | ||
} | ||
|
||
} |