ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
199

How to convert a boolean to an int in the query?

How to convert a boolean to an int in the query? I have five parameters of type boolean in ... for your help galandor Orlov Sergey Consider adding an int field to your entity class, that will sum them. You can calculate it in a JPA lifecycle event. Currently you cannot convert boolean to int in
43

Database Schema Evolution

int to Date) the fields are not considered as matching and the new field is initialized ... to any numeric type. In this context numeric types are: byte, short, char, int, long, float, double ... long as the elements are convertible (e.g. from int[] to ArrayList<Long>). From any object to any
38

JPA Persistable Types

: boolean, byte, short, char, int, long, float and double. Equivalent wrapper classes from package
18

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
17

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
15

JPA Primary Key

: boolean, byte, short, char, int, long, float, double. Equivalent wrapper classes from package java ... (ProjectId.class) public class Project { @Id int departmentId; @Id long projectId ... key fields and its objects can represent primary key values: Class ProjectId { int departmentId
3

Step 2: Define a JPA Entity Class

id; private int x; private int y; public Point() { } Point(int x, int ... id; } public int getX() { return x; } public int getY
3

Step 2: Define a JPA Entity Class

@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
2

[ODB1] Chapter 7 - JDOQL Queries

exists but its type cannot be compared with an int value, a JDOUserException is thrown. If the query ... objects can be obtained using the size() method: int count = result.size(); Iteration ... class contains a field with the name age and a type comparable to int. This section describes
1

[ODB1] Chapter 3 - Persistent Classes

are also persistent types: All the primitive types - boolean, byte, short, char, int, long, float and double. Selected ... fields (persistent fields of types like int[] or Object[]). Any class in which a persistent array ... (for example from int to float and from float to int) the old value is converted automatically to the new

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support