ObjectDB Database Search
101-150 of 200 resultsjakarta.persistence.TransactionRequiredException.TransactionRequiredException(String,Exception) Jakarta Persistence (JPA) Constructor in jakarta.persistence.TransactionRequiredException TransactionRequiredException ( String message , Exception cause ) Constructs a new TransactionRequiredException exception with the specified detail message. Parameters: message - the detail message. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.EntityManager.setProperty(String,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void setProperty ( String propertyName , Object value ) Set an entity manager property or hint. If a vendor-specific property or hint is not recognized, it is silently ignored. Parameters: propertyName | |
jakarta.persistence.criteria.LocalDateField.LocalDateField(String) Jakarta Persistence (JPA) Constructor in jakarta.persistence.criteria.LocalDateField LocalDateField ( String name ) Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.LocalDateTimeField.LocalDateTimeField(String) Jakarta Persistence (JPA) Constructor in jakarta.persistence.criteria.LocalDateTimeField LocalDateTimeField ( String name ) Since: Jakarta Persistence (JPA) 1.0 | |
Query Parameters in JPA with different parameter values is more efficient than using a new query string for each execution ... , String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c.name = :name ... the call to getSingleResult in the same expression. Named parameters in a query string are identifiable by | |
Index Definition class EntityWithSimpleIndex { @Index String indexedField1; @Index ( unique ="true") int indexedField2 ... , Integer , Long , Float , Double java.math.BigInteger , java.math.BigDecimal java.lang. String java ... ={"lastName","firstName"}) public class EntityWithCompositeIndex { String firstName; String | |
Literals in JPQL and Criteria Queries, including NULL , boolean literals ( TRUE and FALSE ), numeric literals (for example, 100 ), string ... ) numeric literals. This feature is not supported by all JPA implementations. String literals JPQL follows SQL syntax for string literals. Strings are enclosed in single quotation marks (for example | |
jakarta.persistence.criteria.CriteriaBuilder ) Create an expression for string concatenation. If the given list of expressions is empty, returns an expression equivalent to literal("") . Parameters: expressions - string expressions Returns: expression ... x , Expression y ) Create an expression for string concatenation. Parameters: x - string expression | |
JPA Persistable Types superclasses, and embeddable classes. Simple Java data types: Primitive types, wrapper classes, ` String ... { String street; String city; String state; String country; String zip; } Instances of embeddable ... , Integer , Long , Float and Double . java.math.BigInteger , java.math.BigDecimal . java.lang. String . java | |
SELECT clause (JPQL / Criteria API), the following query returns country names as String instances, rather than Country objects: SELECT ... of the previous query are returned as a list of String values: TypedQuery query = em. createQuery ( "SELECT c.name FROM Country AS c", String .class); List results = query. getResultList (); You can use | |
JPA Entity Fields { String name; @ManyToOne Department department; } @Entity public class Department { @OneToMany ... () { return _id; } void setId(int id) { _id = id; } private String str; String getStr() { return str; } void setStr( String str) { this.str = str; } } In some JPA implementations, such as Hibernate | |
JPA Named Queries A named query is a statically defined query with a predefined, unchangeable query string . Using ... strings from Java code. This practice also enforces the use of query parameters instead of embedding literals dynamically into the query string , which results in more efficient queries. @NamedQuery | |
JPA Queries Jakarta Persistence provides powerful APIs for executing database queries using JPQL strings or ... EntityManager methods such as createQuery to build query objects using: Direct JPQL query strings ... rather than string -based JPQL. Criteria queries are built using CriteriaBuilder : This is the main factory | |
Defining a JPA Entity Class() { return this.x; } public int getY() { return this.y; } // String Representation: @Override public String toString() { return String .format("(%d, %d)", this.x, this.y); } } As the example shows, an entity | |
JPA Query API JPA, building queries by passing JPQL query strings directly to the createQuery method is called dynamic query construction because you can build the query string dynamically at run time. The JPA ... query elements instead of string -based JPQL. JPA also provides a way to build static queries, known as | |
jakarta.persistence.EntityManager ( String graphName ) Obtain a mutable copy of a named EntityGraph , or return null ... . Since: Jakarta Persistence (JPA) 2.1 Query createNamedQuery ( String name ) Create an instance ... string is found to be invalid. See Also: NamedQuery NamedNativeQuery Since: Jakarta Persistence (JPA) 1 | |
JPA Attributes Annotations, wrappers, Strings ). While optional for supported types, it allows configuration of fetch strategies ... as map keys: Specifies whether an enum should be persisted by its ordinal value or its string name | |
JPA Query Expressions (JPQL / Criteria) [OF] String operator : [NOT] LIKE Logical operators : AND , OR , and NOT JPA queries also support predefined ... ) String expressions ( like , length , locate , lower , upper , concat , substring , …) Date and time | |
Database Schema Evolution to false ; any other value is converted to true ). From any type to String (using toString() if necessary). From String to numeric types, including enum types (when applicable). From any date/time type | |
jakarta.persistence.metamodel.EntityType Methods Attribute getAttribute ( String name ) Return the attribute of the managed type ... CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued ... the managed type. Since: Jakarta Persistence (JPA) 1.0 CollectionAttribute getCollection ( String name | |
jakarta.persistence.metamodel.IdentifiableType Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return the attribute ... CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued attribute ... . Since: Jakarta Persistence (JPA) 1.0 CollectionAttribute getCollection ( String name ) Return | |
jakarta.persistence.metamodel.ManagedType Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds ... CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued attribute ... Persistence (JPA) 1.0 CollectionAttribute getCollection ( String name ) Return the Collection-valued | |
jakarta.persistence.metamodel.EmbeddableType Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds ... type. Since: Jakarta Persistence (JPA) 1.0 CollectionAttribute getCollection ( String name , Class ... CollectionAttribute getCollection ( String name ) Return the Collection-valued attribute of the managed type | |
jakarta.persistence.metamodel.MappedSuperclassType Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return ... CollectionAttribute getCollection ( String name , Class elementType ) Return the Collection-valued ... type. Since: Jakarta Persistence (JPA) 1.0 CollectionAttribute getCollection ( String name ) Return | |
jakarta.persistence.criteria.PluralJoin ( String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed or ... to support casting scalar expressions to String , and String expressions to Integer , Long , Float ... ( String attributeName ) Create a fetch join to the specified attribute using an inner join | |
jakarta.persistence.criteria.MapJoin Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... . Providers are required to support casting scalar expressions to String , and String expressions ... of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0 Fetch fetch ( String | |
jakarta.persistence.criteria.Root . Public Instance Methods Selection alias ( String name ) Assigns an alias to the selection item ... conversion. Providers are required to support casting scalar expressions to String , and String ... . Since: Jakarta Persistence (JPA) 1.0 Fetch fetch ( String attributeName ) Create a fetch join to the specified | |
jakarta.persistence.criteria.SetJoin that has been specified as a Set . Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods Selection alias ( String ... casting scalar expressions to String , and String expressions to Integer , Long , Float , and Double ... ( String attributeName ) Create a fetch join to the specified attribute using an inner join. Inherited | |
jakarta.persistence.criteria.CollectionJoin Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias ... . Providers are required to support casting scalar expressions to String , and String expressions to Integer ... (JPA) 1.0 Fetch fetch ( String attributeName ) Create a fetch join to the specified attribute using | |
jakarta.persistence.EntityGraph.createEntityGraph( String ) EntityManager.getEntityGraph( String ) EntityManagerFactory.addNamedEntityGraph( String , EntityGraph) EntityManager.find(EntityGraph, Object, FindOption...) Since: Jakarta Persistence (JPA) 2.1 Public Instance Methods AttributeNode addAttributeNode ( String attributeName | |
Server Configuration the connection URL string , as explained in the JPA Overview section. The max attribute specifies | |
Collections in JPQL and Criteria Queries = country. get ("languages"); Expression param = cb. parameter ( String .class); // collection IS [NOT | |
JPA Metamodel Attributes, wrappers, Strings ), embedded objects, and associations (reference fields and properties | |
JPA Metamodel Types, Strings , or Dates) that do not contain persistent attributes of their own. An enumeration | |
JPA Query Structure (JPQL / Criteria) and persistent fields. String literals are also case-sensitive (e.g., "ORM" and "orm" are different | |
Numbers in JPQL and Criteria Queries that return a numeric value, such as INDEX and SIZE . As string functions that return a numeric value, such as | |
Retrieving JPA Entities occurs when it is first accessed. For example: String managerName = manager.getName(); Accessing | |
JPA Class Enhancer that can be specified on the command line can also be passed to the enhance method as a single string delimited by | |
What are the main benefits of using ObjectDB? multiple values (even for a simple data structure such as a collection of strings ). In addition | |
WHERE clause (JPQL / Criteria API)) and functions (numeric, string , and collection). The WHERE predicate is always a boolean JPQL expression | |
Step 2: Entity Class and Persistence Unit String name; private Date signingDate; // Constructors: public Guest() { } public Guest( String name) { this.name = name; this.signingDate = new Date(System.currentTimeMillis()); } // String Representation: @Override public String toString() { return name + " (signed on " + signingDate | |
Step 2: Entity Class and Persistence Unit final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private String name; private Date signingDate; // Constructors: public Guest() { } public Guest( String name) { this.name = name; this.signingDate = new Date(System.currentTimeMillis()); } // String Representation | |
Step 2: Entity Class and Persistence Unit; private String name; private Date signingDate; // Constructors: public Guest() { } public Guest( String name) { this.name = name; this.signingDate = new Date(System.currentTimeMillis()); } // String Representation: @Override public String toString() { return name + " (signed on " + signingDate | |
Step 2: Entity Class and Persistence Unit final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private String name; private Date signingDate; // Constructors: public Guest() { } public Guest( String name) { this.name = name; this.signingDate = new Date(System.currentTimeMillis()); } // String Representation | |
Step 2: Define a JPA Entity Class String name; private Date signingDate; // Constructors: public Guest() { } public Guest( String name) { this.name = name; this.signingDate = new Date(System.currentTimeMillis()); } // String Representation: @Override public String toString() { return name + " (signed on " + signingDate + ")"; } }  | |
Step 2: Define a JPA Entity Class public String toString() { return String .format("(%d, %d)", this.x, this.y); } } The new class | |
Step 2: Define a JPA Entity Class() { return id; } public int getX() { return x; } public int getY() { return y; } @Override public String toString() { return String .format("(%d, %d)", this.x, this.y); } } The new class should represent Point | |
Step 4: Add a Controller Class") public ModelAndView guestbook(HttpServletRequest request) { // Handle a new guest (if any): String | |
Step 4: Add a Servlet Class a new guest (if any): String name = request.getParameter("name"); if (name != null) { em | |
Step 3: Add a Main Class( String [] args) { // Open a database connection // (create a new database if it doesn't exist |