ObjectDB Database Search
151-200 of 200 resultsLiterals 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 | |
Database Explorer you execute JPQL and JDOQL queries. To execute a query: Enter a query string . In the Parameters table ... windows. Double-click the field, press F2, or type the new value. Use the Edit Edit Multi Line String command to edit a multiline string . Reference fields can be edited by using the following commands: 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 | |
Posting Sample Code; public static void main( String [] args) {   ... { private String name; MyEntity( String name) {   | |
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 | |
Online Backup").getSingleResult(); The backup query string is always "objectdb backup" . The backup is created in the backup ... as a String value: Query backupQuery = em.createQuery("objectdb backup"); backupQuery.setParameter("target", "backup"); backupQuery.getSingleResult(); When you specify a string for the target | |
Paths and Types in JPQL and Criteria API numbers, booleans, strings , and dates. Values of simple types are more useful in queries because they have special operators and functions (for example, for strings and numbers ). They can also be compared ... to collections, maps, or values of simple types (such as numbers, booleans, strings , and dates). For a path | |
GROUP BY and HAVING clauses a double . MIN : Returns the minimum of comparable values, such as numbers, strings , and dates. MAX : Returns the maximum of comparable values, such as numbers, strings , and dates. For each starting letter ... [] arrays of length three. The first element in each array is a String object for the initial letter | |
jakarta.persistence.EntityManager createEntityGraph ( String graphName ) Obtain a mutable copy of a named EntityGraph , or return null ... graph. 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 | |
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 | |
JPA Metamodel API only one method, which gets the entity name: String entityName = entityType. getName (); Attribute ... : // Get the field (or property) name: String name = attr. getName (); // Get Java representation of the field (or | |
JPA Criteria Query Selection and Results;the result as an array of objects or as individual values by index, alias string or ... of this selection in result tuples, rather than by index or string that are considered | |
Comparison in JPQL and Criteria API , Float , Double ), BigInteger , and BigDecimal . String values: Any comparison operator can be used ... can be compared to a BigInteger instance, but not to a String instance. [NOT] BETWEEN The BETWEEN operator | |
ObjectDB Object Database Features types (Boolean, Byte, Short, Character, Integer, Long, Float, Double). java.lang. String Date types ... , Short, Character, Integer, Long, Float and Double). java.lang. String Dates: java.util.Date, java.sql | |
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 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 ... ( String attributeName ) Create a fetch join to the specified attribute using an inner join | |
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 alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed ... to support casting scalar expressions to String , and String expressions to Integer , Long , Float ... fetch ( String attributeName ) Create a fetch join to the specified attribute using an inner join | |
jakarta.persistence.criteria.CollectionJoin Instance Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... conversion. Providers are required to support casting scalar expressions to String , and String expressions ... Persistence (JPA) 1.0 Fetch fetch ( String attributeName ) Create a fetch join to the specified | |
jakarta.persistence.criteria.ListJoin alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias ... are required to support casting scalar expressions to String , and String expressions to Integer , Long , Float ... Fetch fetch ( String attributeName ) Create a fetch join to the specified attribute using an inner join | |
jakarta.persistence.criteria.From to the type. Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods Selection alias ( String name ... scalar expressions to String , and String expressions to Integer , Long , Float , and Double . Support ... of the join Returns: the resulting join. Since: Jakarta Persistence (JPA) 1.0 Fetch fetch ( String | |
jakarta.persistence.criteria.Join Instance Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... conversion. Providers are required to support casting scalar expressions to String , and String expressions ... Persistence (JPA) 1.0 Fetch fetch ( String attributeName ) Create a fetch join to the specified | |
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 | |
jakarta.persistence.AttributeOverride Integer id; @Version protected Integer version; protected String address; public Integer getId() { ... } public void setId(Integer id) { ... } public String getAddress() { ... } public void setAddress( String address) { ... } } @Entity @AttributeOverride(name = "address", column = @Column(name = "ADDR | |
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 @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: @Override public String toString() { return name + " (signed | |
[ODB1] Chapter 9 - ObjectDB Explorer are provided in the "Edit" menu and in the content menu. Use the "Edit Multi Line String " command to edit a multi line string . Use the "Set Reference" command to set a reference field to a new object ... . The "Encoding" combo box should reflect the encoding of strings in the database. ObjectDB stores String | |
[ODB1] Chapter 4 - JDO Metadata contains all the fields with primitive types (e.g. int), types defined in java.lang (e.g. String ... . Wrapper objects, strings , dates, collections and arrays are embedded by default. To use them as non ... . String field, empty collection, 0 size array, and so on). primary-key The primary-key attribute, defined | |
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 | |
[ODB1] Chapter 8 - ObjectDB Server the connection URL string . 8.1 Running an ObjectDB Server The ObjectDB server is a pure Java ... in the url connection string (as explained in section 5.1 ) when connecting to the database ... directory. For instance, a url connection string "objectdb://localhost/my/db.odb" refers to a database file | |
[ODB1] Chapter 3 - Persistent Classes , Character , Integer , Long , Float , Double , Number and String . Selected classes in package java ... */ public class eMain { public static void main( String [] args) { // Always start by calling ... ( ... ) static method accepts as an argument a string specifying the classes to be enhanced. The syntax |