-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #539 from eclipse/jnosql-535
Create Map type to mapper field
- Loading branch information
Showing
36 changed files
with
1,138 additions
and
64 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
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
46 changes: 46 additions & 0 deletions
46
...-mapping-api-core/src/main/java/org/eclipse/jnosql/mapping/metadata/MapFieldMetadata.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,46 @@ | ||
/* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. | ||
* | ||
* You may elect to redistribute this code under either of these licenses. | ||
* | ||
* Contributors: | ||
* | ||
* Otavio Santana | ||
*/ | ||
package org.eclipse.jnosql.mapping.metadata; | ||
|
||
/** | ||
* The MapFieldMetadata interface extends the {@link FieldMetadata} interface and provides | ||
* additional information about a parameter with a map type. | ||
* | ||
* <p>This interface is used to represent parameters of map types, where the type may be a map | ||
* containing keys and values of specific types.</p> | ||
* | ||
* @see ParameterMetaData | ||
*/ | ||
public interface MapFieldMetadata extends FieldMetadata { | ||
/** | ||
* Returns true if either the key or value has Entity or Embeddable annotations | ||
* @return true if the key or value has Entity or Embeddable annotations | ||
*/ | ||
boolean isEmbeddable(); | ||
|
||
/** | ||
* Returns the {@link Class} representing the type of keys in the map. | ||
* | ||
* @return the key type of the map parameter | ||
*/ | ||
Class<?> keyType(); | ||
|
||
/** | ||
* Returns the {@link Class} representing the type of values in the map. | ||
* | ||
* @return the value type of the map parameter | ||
*/ | ||
Class<?> valueType(); | ||
} |
52 changes: 52 additions & 0 deletions
52
...ping-api-core/src/main/java/org/eclipse/jnosql/mapping/metadata/MapParameterMetaData.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,52 @@ | ||
/* | ||
* Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php. | ||
* | ||
* You may elect to redistribute this code under either of these licenses. | ||
* | ||
* Contributors: | ||
* | ||
* Otavio Santana | ||
*/ | ||
package org.eclipse.jnosql.mapping.metadata; | ||
|
||
|
||
import org.eclipse.jnosql.communication.Value; | ||
|
||
/** | ||
* The MapParameterMetaData interface extends the {@link ParameterMetaData} interface and provides | ||
* additional information about a parameter with a generic type for maps. | ||
* | ||
* <p>This interface is used to represent parameters of generic types, where the type may be a map | ||
* containing keys and values of specific types.</p> | ||
* | ||
* @see ParameterMetaData | ||
*/ | ||
public interface MapParameterMetaData extends ParameterMetaData { | ||
|
||
/** | ||
* Returns the {@link Class} representing the type of keys in the map. | ||
* | ||
* @return the key type of the map parameter | ||
*/ | ||
Class<?> keyType(); | ||
|
||
/** | ||
* Returns the {@link Class} representing the type of values in the map. | ||
* | ||
* @return the value type of the map parameter | ||
*/ | ||
Class<?> valueType(); | ||
|
||
/** | ||
* Returns the object from the field type. | ||
* | ||
* @param value the value {@link Value} | ||
* @return the instance from the field type | ||
*/ | ||
Object value(Value value); | ||
} |
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.