Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

JPA-60 #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/javax/persistence/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
@Retention(RUNTIME)
public @interface Access {

/**
* (Required) Specification of field- or property-based access.
*/
AccessType value();
/**
* (Required) Specification of field- or property-based access.
*/
AccessType value();
}
8 changes: 4 additions & 4 deletions src/main/java/javax/persistence/AccessType.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/
public enum AccessType {

/** Field-based access is used. */
FIELD,
/** Field-based access is used. */
FIELD,

/** Property-based access is used. */
PROPERTY
/** Property-based access is used. */
PROPERTY
}
52 changes: 26 additions & 26 deletions src/main/java/javax/persistence/AssociationOverride.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,34 +122,34 @@

public @interface AssociationOverride {

/**
* (Required) The name of the relationship property whose mapping is
* being overridden if property-based access is being used,
* or the name of the relationship field if field-based access is used.
*/
String name();
/**
* (Required) The name of the relationship property whose mapping is
* being overridden if property-based access is being used,
* or the name of the relationship field if field-based access is used.
*/
String name();

/**
* The join column(s) being mapped to the persistent attribute(s).
* The <code>joinColumns</code> elements must be specified if a
* foreign key mapping is used in the overriding of the mapping of
* the relationship. The <code>joinColumns</code> element must
* not be specified if a join table is used in the overriding of
* the mapping of the relationship.
*/
JoinColumn[] joinColumns() default {};
/**
* The join column(s) being mapped to the persistent attribute(s).
* The <code>joinColumns</code> elements must be specified if a
* foreign key mapping is used in the overriding of the mapping of
* the relationship. The <code>joinColumns</code> element must
* not be specified if a join table is used in the overriding of
* the mapping of the relationship.
*/
JoinColumn[] joinColumns() default {};

/**
* The join table that maps the relationship.
* The <code>joinTable</code> element must be specified if a join table
* is used in the overriding of the mapping of the
* relationship. The <code>joinTable</code> element must not be specified
* if a foreign key mapping is used in the overriding of
* the relationship.
*
* @since Java Persistence 2.0
*/
JoinTable joinTable() default @JoinTable;
/**
* The join table that maps the relationship.
* The <code>joinTable</code> element must be specified if a join table
* is used in the overriding of the mapping of the
* relationship. The <code>joinTable</code> element must not be specified
* if a foreign key mapping is used in the overriding of
* the relationship.
*
* @since Java Persistence 2.0
*/
JoinTable joinTable() default @JoinTable;

/**
* (Optional) Used to specify or control the generation of a foreign key constraint for the columns
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/javax/persistence/AssociationOverrides.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@

public @interface AssociationOverrides {

/**
*(Required) The association override mappings that are to be
* applied to the relationship field or property .
*/
AssociationOverride[] value();
/**
*(Required) The association override mappings that are to be
* applied to the relationship field or property .
*/
AssociationOverride[] value();
}
24 changes: 12 additions & 12 deletions src/main/java/javax/persistence/AttributeOverride.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,17 @@

public @interface AttributeOverride {

/**
* (Required) The name of the property whose mapping is being
* overridden if property-based access is being used, or the
* name of the field if field-based access is used.
*/
String name();
/**
* (Required) The name of the property whose mapping is being
* overridden if property-based access is being used, or the
* name of the field if field-based access is used.
*/
String name();

/**
* (Required) The column that is being mapped to the persistent
* attribute. The mapping type will remain the same as is
* defined in the embeddable class or mapped superclass.
*/
Column column();
/**
* (Required) The column that is being mapped to the persistent
* attribute. The mapping type will remain the same as is
* defined in the embeddable class or mapped superclass.
*/
Column column();
}
4 changes: 2 additions & 2 deletions src/main/java/javax/persistence/AttributeOverrides.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@

public @interface AttributeOverrides {

/** (Required) One or more field or property mapping overrides. */
AttributeOverride[] value();
/** (Required) One or more field or property mapping overrides. */
AttributeOverride[] value();
}
32 changes: 16 additions & 16 deletions src/main/java/javax/persistence/Basic.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@
@Retention(RUNTIME)
public @interface Basic {

/**
* (Optional) Defines whether the value of the field or property should
* be lazily loaded or must be eagerly fetched. The <code>EAGER</code>
* strategy is a requirement on the persistence provider runtime
* that the value must be eagerly fetched. The <code>LAZY</code>
* strategy is a hint to the persistence provider runtime.
* If not specified, defaults to <code>EAGER</code>.
*/
FetchType fetch() default EAGER;
/**
* (Optional) Defines whether the value of the field or property should
* be lazily loaded or must be eagerly fetched. The <code>EAGER</code>
* strategy is a requirement on the persistence provider runtime
* that the value must be eagerly fetched. The <code>LAZY</code>
* strategy is a hint to the persistence provider runtime.
* If not specified, defaults to <code>EAGER</code>.
*/
FetchType fetch() default EAGER;

/**
* (Optional) Defines whether the value of the field or property may be null.
* This is a hint and is disregarded for primitive types; it may
* be used in schema generation.
* If not specified, defaults to <code>true</code>.
*/
boolean optional() default true;
/**
* (Optional) Defines whether the value of the field or property may be null.
* This is a hint and is disregarded for primitive types; it may
* be used in schema generation.
* If not specified, defaults to <code>true</code>.
*/
boolean optional() default true;
}
46 changes: 23 additions & 23 deletions src/main/java/javax/persistence/Cache.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@
*/
public interface Cache {

/**
* Whether the cache contains data for the given entity.
* @param cls entity class
* @param primaryKey primary key
* @return boolean indicating whether the entity is in the cache
*/
public boolean contains(Class cls, Object primaryKey);
/**
* Whether the cache contains data for the given entity.
* @param cls entity class
* @param primaryKey primary key
* @return boolean indicating whether the entity is in the cache
*/
public boolean contains(Class cls, Object primaryKey);

/**
* Remove the data for the given entity from the cache.
* @param cls entity class
* @param primaryKey primary key
*/
public void evict(Class cls, Object primaryKey);
/**
* Remove the data for the given entity from the cache.
* @param cls entity class
* @param primaryKey primary key
*/
public void evict(Class cls, Object primaryKey);

/**
* Remove the data for entities of the specified class (and its
* subclasses) from the cache.
* @param cls entity class
*/
public void evict(Class cls);
/**
* Remove the data for entities of the specified class (and its
* subclasses) from the cache.
* @param cls entity class
*/
public void evict(Class cls);

/**
* Clear the cache.
*/
public void evictAll();
/**
* Clear the cache.
*/
public void evictAll();

/**
* Return an object of the specified type to allow access to the provider-specific API.
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/javax/persistence/CacheRetrieveMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
*/
public enum CacheRetrieveMode {

/**
* Read entity data from the cache: this is
* the default behavior.
*/
USE,
/**
* Read entity data from the cache: this is
* the default behavior.
*/
USE,

/**
* Bypass the cache: get data directly from
* the database.
*/
BYPASS
/**
* Bypass the cache: get data directly from
* the database.
*/
BYPASS
}

34 changes: 17 additions & 17 deletions src/main/java/javax/persistence/CacheStoreMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
*/
public enum CacheStoreMode {

/**
* Insert/update entity data into cache when read
* from database and when committed into database:
* this is the default behavior. Does not force refresh
* of already cached items when reading from database.
*/
USE,
/**
* Insert/update entity data into cache when read
* from database and when committed into database:
* this is the default behavior. Does not force refresh
* of already cached items when reading from database.
*/
USE,

/**
* Don't insert into cache.
*/
BYPASS,
/**
* Don't insert into cache.
*/
BYPASS,

/**
* Insert/update entity data into cache when read
* from database and when committed into database.
* Forces refresh of cache for items read from database.
*/
REFRESH
/**
* Insert/update entity data into cache when read
* from database and when committed into database.
* Forces refresh of cache for items read from database.
*/
REFRESH
}
8 changes: 4 additions & 4 deletions src/main/java/javax/persistence/Cacheable.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
@Retention(RUNTIME)
public @interface Cacheable {

/**
* (Optional) Whether or not the entity should be cached.
*/
boolean value() default true;
/**
* (Optional) Whether or not the entity should be cached.
*/
boolean value() default true;
}

34 changes: 17 additions & 17 deletions src/main/java/javax/persistence/CascadeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@
*/
public enum CascadeType {

/** Cascade all operations */
ALL,
/** Cascade all operations */
ALL,

/** Cascade persist operation */
PERSIST,
/** Cascade persist operation */
PERSIST,

/** Cascade merge operation */
MERGE,
/** Cascade merge operation */
MERGE,

/** Cascade remove operation */
REMOVE,
/** Cascade remove operation */
REMOVE,

/** Cascade refresh operation */
REFRESH,
/** Cascade refresh operation */
REFRESH,

/**
* Cascade detach operation
*
* @since Java Persistence 2.0
*
*/
DETACH
/**
* Cascade detach operation
*
* @since Java Persistence 2.0
*
*/
DETACH
}
Loading