Skip to content

Commit

Permalink
clarify the semantics of Bindable.ENTITY_TYPE via javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Aug 15, 2023
1 parent 5604d11 commit 96b5613
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
33 changes: 22 additions & 11 deletions api/src/main/java/jakarta/persistence/metamodel/Bindable.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,36 @@
*
*/
public interface Bindable<T> {

public static enum BindableType {

public static enum BindableType {
/**
* Single-valued attribute type.
*
* @see SingularAttribute
*/
SINGULAR_ATTRIBUTE,

/** Single-valued attribute type */
SINGULAR_ATTRIBUTE,
/**
* Multivalued attribute type, that is, a collection.
*
* @see PluralAttribute
*/
PLURAL_ATTRIBUTE,

/** Multi-valued attribute type */
PLURAL_ATTRIBUTE,

/** Entity type */
ENTITY_TYPE
}
/**
* Entity type.
*
* @see EntityType
*/
ENTITY_TYPE
}

/**
* Return the bindable type of the represented object.
* @return bindable type
*/
BindableType getBindableType();

/**
* Return the Java type of the represented object.
* If the bindable type of the object is <code>PLURAL_ATTRIBUTE</code>,
Expand Down
19 changes: 15 additions & 4 deletions spec/src/main/asciidoc/ch05-metamodel-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -660,14 +660,25 @@ import jakarta.persistence.criteria.Path;
public interface Bindable<T> {
public static enum BindableType {
/** Single-valued attribute type */
/**
* Single-valued attribute type.
*
* @see SingularAttribute
*/
SINGULAR_ATTRIBUTE,
/** Multi-valued attribute type */
/**
* Multivalued attribute type, that is, a collection.
*
* @see PluralAttribute
*/
PLURAL_ATTRIBUTE,
/** Entity type */
/**
* Entity type.
*
* @see EntityType
*/
ENTITY_TYPE
}
Expand Down

0 comments on commit 96b5613

Please sign in to comment.