ObjectDB Database Search
1-50 of 200 resultsjakarta.persistence.criteria.CriteriaBuilder.substring(Expression,int,int) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression substring ( Expression x , int from , int len ) Create an expression for substring extraction. Extracts a substring of given length starting at the specified position | |
jakarta.persistence.TypedQuery.setFirstResult(int) Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setFirstResult ( int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setParameter(int,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setParameter ( int position , Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query instance. Throws | |
jakarta.persistence.TypedQuery.setParameter(int,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setParameter ( int position , Calendar value , TemporalType temporalType ) Bind an instance of Calendar to a positional parameter. Parameters: position - position temporalType | |
jakarta.persistence.TypedQuery.setParameter(int,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setParameter ( int position , Date value , TemporalType temporalType ) Bind an instance of Date to a positional parameter. Parameters: position - position temporalType - temporal | |
jakarta.persistence.Timeout.s(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Timeout Timeout s ( int seconds ) Specify a timeout in seconds. (Abbreviation of Timeout.seconds .) Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.Timeout.ms(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Timeout Timeout ms ( int milliseconds ) Specify a timeout in milliseconds. (Abbreviation of Timeout.milliseconds .) Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.Timeout.seconds(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Timeout Timeout seconds ( int seconds ) Specify a timeout in seconds. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.Tuple.get(int,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.Tuple X get ( int i , Class type ) Get the value of the element at the specified position in the result tuple. The first position is 0. Parameters: i - position in result tuple type - type of the tuple element | |
jakarta.persistence.Tuple.get(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Tuple Object get ( int i ) Get the value of the element at the specified position in the result tuple. The first position is 0. Parameters: i - position in result tuple Returns: value of the tuple element. Throws | |
jakarta.persistence.Timeout.milliseconds(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Timeout Timeout milliseconds ( int milliseconds ) Specify a timeout in milliseconds. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.TypedQuery.setMaxResults(int) Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setMaxResults ( int maxResult ) Set the maximum number of results to retrieve. Parameters: maxResult - maximum number of results to retrieve Returns: the same query instance. Throws: IllegalArgumentException | |
jakarta.persistence.StoredProcedureQuery.setParameter(int,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery setParameter ( int position , Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query | |
jakarta.persistence.StoredProcedureQuery.setParameter(int,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery setParameter ( int position , Calendar value , TemporalType temporalType ) Bind an instance of java.util.Calendar to a positional parameter. Parameters: position | |
jakarta.persistence.StoredProcedureQuery.setParameter(int,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery setParameter ( int position , Date value , TemporalType temporalType ) Bind an instance of java.util.Date to a positional parameter. Parameters: position | |
jakarta.persistence.StoredProcedureQuery.getOutputParameterValue(int) Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery Object getOutputParameterValue ( int position ) Retrieve a value passed back from the procedure through an INOUT or OUT parameter. For portability, all results corresponding to result sets and update counts | |
jakarta.persistence.StoredProcedureQuery.registerStoredProcedureParameter(int,Class,ParameterMode) Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery registerStoredProcedureParameter ( int position , Class type , ParameterMode mode ) Register a positional parameter. All parameters must be registered | |
jakarta.persistence.Timeout.Timeout(int) Jakarta Persistence (JPA) Constructor in jakarta.persistence.Timeout Timeout ( int milliseconds ) Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.CriteriaBuilder.substring(Expression,int) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression substring ( Expression x , int from ) Create an expression for substring extraction. Extracts a substring starting at the specified position through to end of the string. First | |
jakarta.persistence.criteria.CriteriaBuilder.left(Expression,int) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression left ( Expression x , int len ) Create an expression for the leftmost substring of a string, Parameters: x - string expression len - length of the substring to return Returns | |
jakarta.persistence.criteria.CriteriaBuilder.right(Expression,int) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression right ( Expression x , int len ) Create an expression for the rightmost substring of a string, Parameters: x - string expression len - length of the substring to return Returns | |
jakarta.persistence.Query.setParameter(int,Date,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setParameter ( int position , Date value , TemporalType temporalType ) Bind an instance of Date to a positional parameter. Parameters: position - position temporalType - temporal type value | |
jakarta.persistence.Query.setParameter(int,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setParameter ( int position , Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query instance. Throws | |
jakarta.persistence.Query.setParameter(int,Calendar,TemporalType) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setParameter ( int position , Calendar value , TemporalType temporalType ) Bind an instance of Calendar to a positional parameter. Parameters: position - position temporalType - temporal type | |
jakarta.persistence.Query.getParameterValue(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Object getParameterValue ( int position ) Return the input value bound to the positional parameter. (Note that OUT parameters are unbound.) Parameters: position - position Returns: parameter value. Throws | |
jakarta.persistence.Query.getParameter(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Parameter getParameter ( int position ) Get the parameter object corresponding to the declared positional parameter with the given position. This method is not required to be supported for native queries. Parameters | |
jakarta.persistence.Query.getParameter(int,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Parameter getParameter ( int position , Class type ) Get the parameter object corresponding to the declared positional parameter with the given position and type. This method is not required to be supported by | |
jakarta.persistence.Query.setMaxResults(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setMaxResults ( int maxResult ) Set the maximum number of results to retrieve. Parameters: maxResult - maximum number of results to retrieve Returns: the same query instance. Throws: IllegalArgumentException | |
jakarta.persistence.criteria.CriteriaBuilder.locate(Expression,String,int) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression locate ( Expression x , String pattern , int from ) Create expression to locate the position of one string within another, returning position of first character | |
jakarta.persistence.Query.setFirstResult(int) Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setFirstResult ( int startPosition ) Set the position of the first result to retrieve. Parameters: startPosition - position of the first result, numbered from 0 Returns: the same query instance. Throws | |
JPA Entity Fields (which only affects persistence): @Entity public class EntityWithTransientFields { static int transient1; // not persistent because of static final int transient2 = 0; // not persistent because of final transient int transient3; // not persistent because of transient @Transient int transient4; // not | |
Defining a JPA Entity Class; @Entity public class Point { // Persistent Fields: private int x; private int y; // Constructor: Point ( int x, int y) { this.x = x; this.y = y; } // Accessor Methods: public int getX() { return this.x; } public int getY() { return this.y; } // String Representation: @Override public String toString | |
JPA Primary Key , char , int , long , float , double . Equivalent wrapper classes from package java.lang: Byte ... (ProjectId.class) public class Project { @Id int departmentId; @Id long projectId; : } When an entity ... can represent primary key values: public class ProjectId { int departmentId; long projectId | |
Index Definition; @Entity public class EntityWithSimpleIndex { @Index String indexedField1; @Index ( unique ="true") int indexedField2; // unique @Index ( name ="i3") int indexedField3; @Unique Integer indexedField4 ... : Primitive types: boolean , byte , short , char , int , long , float , double. Equivalent wrapper | |
Numbers in JPQL and Criteria Queries of a binary arithmetic operation on an int value and a double value is double . The ABS Function The ABS ... is used as with binary arithmetic operations in Java (e.g. for int and long operands the MOD  ... demonstrate only integer expressions, but all the numeric types ( byte , short , int , long , float | |
Database Schema Evolution from int to Date ) the fields are not considered as matching and the new field is initialized ... type to any numeric type. In this context numeric types are: byte , short , char , int , long ... collection or array type, as long as the elements are convertible (e.g. from int [] to ArrayList | |
Running JPA Queries method. For example, the following query deletes all the Country instances: int count = em ... all the Country instances to zero: int count = em. createQuery ("UPDATE Country SET area = 0 | |
ObjectDB Object Database Features System Types (for persistent fields) Primitive types (boolean, byte, short, char, int , long, float ... . Primary Key Data Types Primitives (boolean, byte, short, char, int , long, float and double). Wrappers | |
jakarta.persistence.StoredProcedureQuery timeout value set and only the statement is rolled back. Since: Jakarta Persistence (JPA) 1.0 int ... execution. Inherited from Query Since: Jakarta Persistence (JPA) 3.2 int getFirstResult () The position ... Persistence (JPA) 2.0 int getMaxResults () The maximum number of results the query object was set | |
Storing JPA Entity Objects transactions: em. getTransaction (). begin (); for ( int i = 1; i | |
Strings in JPQL and Criteria Queries returns the number of characters in the argument string as an int . For example: LENGTH('United | |
JPA Persistable Types , byte , short , char , int , long , float and double . Equivalent wrapper classes from package java | |
DELETE Queries in JPA/JPQL queries are executed using the executeUpdate method: int deletedCount = em. createQuery | |
Literals in JPQL and Criteria Queries ) are also supported. Following are examples of valid numeric literals in JPQL: int : 100, -127, 0, 07777 long | |
Query Parameters in JPA (); } The form of ordinal parameters is a question mark (?) followed by a positive int number. Apart from | |
CRUD Database Operations with JPA (); for ( int i = 0; i = 100) { em. remove (p); // delete entity } else { p.setX(p.getX() + 100); // update | |
Step 2: Define a JPA Entity Class; private int x; private int y; public Point() { } Point( int x, int y) { this.x = x; this.y = y; } public Long getId() { return id; } public int getX() { return x; } public int getY() { return y; } @Override | |
Step 2: Define a JPA Entity Class static final long serialVersionUID = 1L; @Id @GeneratedValue private long id; private int x; private int y; public Point() { } Point( int x, int y) { this.x = x; this.y = y; } public Long getId() { return id; } public int getX() { return x; } public int getY() { return y; } @Override public String | |
Step 3: Add a Main Class = emf.createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction().begin(); for ( int i = 0; i | |
Step 3: Add a Main Class.createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction().begin(); for ( int i = 0; i |