Internal Website Search

1-50 of 200 results

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 ... ._PersistenceException: Invalid operand type boolean for operator + Please tell me how to do this? Thanks ... them. You can calculate it in a JPA lifecycle event . Currently you cannot convert boolean to int in

PersistenceManager.getObjectsById(Collection,boolean) throwing JDOException

I have a call to getObjectsById(Collection, boolean ) that is throwing a JDOException the first time I'm attempting to retrieve an object. If I try again, then the second request succeeds. Any idea why this might occur? We're using ObjectDB 2.2.4_02. The collection being passed in is a HashSet

Logical Operators in JPQL and Criteria API

Logical operators in JPQL and in JPA criteria queries enable composition of complex JPQL boolean expressions out of simple JPQL boolean expressions. Logical Operators ObjectDB supports 2 sets ... part of its JDO support. Criteria Query Logical Operators Boolean Expressions and Predicates Boolean

Literals in JPQL and Criteria Queries

including NULL , boolean literals ( TRUE and FALSE ), numeric literals (e.g. 100 ), string literals ... rules, as explained in the Comparison Operators page. Boolean Literals Similarly to Java and SQL, JPQL supports two boolean literals - TRUE and FALSE . Since JPQL is case insensitive, TRUE is equivalent

ObjectDB Object Database Features

System Types (for persistent fields) Primitive types ( boolean , byte, short, char, int, long, float, double). Wrapper types ( Boolean , Byte, Short, Character, Integer, Long, Float, Double). java.lang ... . Primary Key Data Types Primitives ( boolean , byte, short, char, int, long, float and double). Wrappers

Comparison in JPQL and Criteria API

, comparing the content rather than the identity. Values of the boolean and Boolean types can be compared by equality operators (=, , == , != ) which follow the logic of Java's equals (for Boolean instances

JPA Persistable Types

All the following simple Java data types are persistable: Primitive types: boolean , byte , short , char , int , long , float and double . Equivalent wrapper classes from package java.lang: Boolean , Byte

Retrieving JPA Entity Objects

. getPersistenceUtil (); boolean isObjectLoaded = util. isLoaded (employee); boolean isFieldLoaded = util

WHERE clause (JPQL / Criteria API)

to function as a filter. The boolean expression in the WHERE clause, which is also known as ... is always a boolean JPQL expression. JPQL expressions are also used in other JPQL query clauses

Database Schema Evolution

and enum values that are stored as numeric ordinal values (the default). From any type to Boolean or boolean ( 0 , null and false are converted to false , any other value is converted to true ). From

JPA Metamodel API

= entityType. getSupertype (); // Checks if the type has a single ID attribute: boolean hasSingleId ... if the type has a version attribute: boolean hasVersion = entityType. hasVersionAttribute (); // Gets

Paths and Types in JPQL and Criteria API

. But more often they are used in JPQL path expressions that navigate to values of simple types (number, boolean ... types (number, boolean , string, date). For a path expression to be valid the user defined persistable

ObjectDB enhancement fails on "is" form for @Transient boolean isLoaded(), ok for "getter" form @Transient boolean getLoaded()

Element I encounter ObjectDB enhancement errors: private boolean loaded = false; @Transient @Override public boolean isLoaded() { return loaded; } @Override public void setLoaded( boolean loaded ... . ... But it is ok using the 'get' getter form: private boolean loaded = false; @Transient @Override public

Index Definition

: Primitive types: boolean , byte , short , char , int , long , float , double. Equivalent wrapper

Shared (L2) Entity Cache

(); The Cache object enables checking if a specified entity object is cached: boolean isCached

Working with JPA Entity Objects

entity object is in the persistence context: boolean isManaged = em. contains (employee

JPA Primary Key

that is set by the application can have one of the following types: Primitive types: boolean , byte , short

boolean field flips after schema update (in class) of another field

We have added a boolean field to a class with default value false. After deployment on several instances the values of other boolean fields in the same class (next to the new one) flip or ... application = null ; @Embeddable public static class Application { private boolean instruction = false

[ODB1] Chapter 5 - JDO Connections

. Setting these flags for a PersistenceManagerFactory can be done using boolean properties ... (true); // Using the getter methods: boolean flag1 = pmf.getOptimistic(); boolean flag2 = pmf.getNontransactionalRead(); boolean flag3 = pmf.getNontransactionalWrite(); boolean flag4 = pmf

[ODB1] Chapter 7 - JDOQL Queries

(usually a persistent class) A filter, which is a boolean expression in a Java like syntax The query ... A query filter is a string containing a boolean expression in a Java like syntax. It has to be valid in ... ' , ... string "", " ", "abcd\n1234" , ... boolean true, false reference null   As shown in

javax.persistence.criteria.CriteriaQuery

CriteriaQuery . Public Methods CriteriaQuery distinct ( boolean  distinct) Specify ... . Parameters: distinct - boolean value specifying whether duplicate results must be eliminated from ... : restriction - a simple or compound boolean expression Return: the modified query Since: JPA 2.0 CriteriaQuery

javax.persistence.criteria.AbstractQuery

of restrictions. Since: JPA 2.0 Public Methods AbstractQuery distinct ( boolean  distinct) Specify ... results must be retained. Parameters: distinct - boolean value specifying whether duplicate results ... restriction(s), if any. Parameters: restriction - a simple or compound boolean expression Return

javax.persistence.criteria.Subquery

distinct ( boolean  distinct) Specify whether duplicate query results will be eliminated. A true ... the return type of the corresponding AbstractQuery method. Parameters: distinct - boolean value ... : restriction - a simple or compound boolean expression Return: the modified subquery Since: JPA 2.0

javax.persistence.metamodel.SingularAttribute

: type of attribute Since: JPA 2.0 boolean isId () Is the attribute an id attribute. This method ... an attribute of an id class. Return: boolean indicating whether the attribute is an id Since: JPA 2.0 boolean isOptional () Can the attribute be null. Return: boolean indicating whether the attribute

javax.persistence.criteria.CriteriaBuilder

of the given boolean expressions. Parameters: x - boolean expression y - boolean expression Return ... ) Create a disjunction of the given boolean expressions. Parameters: x - boolean expression y - boolean expression Return: or predicate Since: JPA 2.0 Predicate or (Predicate... restrictions

javax.persistence.criteria.CriteriaBuilder$In

the query. Return: list of boolean expressions forming the predicate Inherited from: Predicate Since: JPA 2.0 Predicate.BooleanOperator getOperator () Return the boolean operator for the predicate. If the predicate is simple, this is AND . Return: boolean operator for the predicate Inherited from: Predicate

javax.persistence.criteria.Predicate

of boolean expressions forming the predicate Since: JPA 2.0 Predicate.BooleanOperator getOperator () Return the boolean operator for the predicate. If the predicate is simple, this is AND . Return: boolean operator for the predicate Since: JPA 2.0 boolean isNegated () Whether the predicate

javax.persistence.EntityManager

: IllegalStateException - if the entity manager is container-managed Since: JPA 1.0 boolean contains (Object  ... context. Parameters: entity - entity instance Return: boolean indicating if entity is in persistence ... boolean isJoinedToTransaction () Determine whether the entity manager is joined to the current

javax.persistence.StoredProcedureQuery

calls to getOutputParameterValue . See Also: Query Parameter Since: JPA 2.1 Public Methods boolean ... execution exceeds the query timeout value set and the transaction is rolled back Since: JPA 2.1 boolean ... 2.1 boolean isBound ( Parameter  param) Return a boolean indicating whether a value

[ODB1] Chapter 6 - Persistent Objects

five JDOHelper static methods: boolean b1 = JDOHelper.isPersistent(obj); boolean b2 = JDOHelper.isTransactional(obj); boolean b3 = JDOHelper.isNew(obj); boolean b4 = JDOHelper.isDeleted(obj); boolean b5

javax.persistence.metamodel.MappedSuperclassType

Inherited from: IdentifiableType Since: JPA 2.0 boolean hasSingleIdAttribute () Whether the identifiable ... for an idclass. Return: boolean indicating whether the identifiable type has a single id attribute Inherited from: IdentifiableType Since: JPA 2.0 boolean hasVersionAttribute () Whether the identifiable type

javax.persistence.EntityTransaction

- if the commit fails Since: JPA 1.0 boolean getRollbackOnly () Determine whether the current resource transaction has been marked for rollback. Return: boolean indicating whether the transaction has been marked for rollback Throws: IllegalStateException - if isActive() is false Since: JPA 1.0 boolean

javax.persistence.MapKeyJoinColumn

provider's default foreign key strategy will apply. Since: JPA 2.1 boolean insertable default true ... of the referencing entity or embeddable class; "_"; "KEY". Since: JPA 2.0 boolean nullable default false ... of the entity that is the value of the map. Since: JPA 2.0 boolean unique default false (Optional

javax.persistence.metamodel.Attribute

for the attribute. Return: persistent attribute type Since: JPA 2.0 boolean isAssociation () Is the attribute an association. Return: boolean indicating whether the attribute corresponds to an association Since: JPA 2.0 boolean isCollection () Is the attribute collection-valued (represents a Collection

javax.persistence.MapKeyColumn

.0 boolean insertable default true (Optional) Whether the column is included in SQL INSERT ... of the referencing relationship field or property; "_"; " KEY ". Since: JPA 2.0 boolean nullable default false ... .0 boolean unique default false (Optional) Whether the column is a unique key. This is a shortcut

javax.persistence.Column

a column of the inferred type. Since: JPA 1.0 boolean insertable default true (Optional) Whether the column ... field name. Since: JPA 1.0 boolean nullable default true (Optional) Whether the database column ... to be in the primary table. Since: JPA 1.0 boolean unique default false (Optional) Whether the column

javax.persistence.metamodel.IdentifiableType

Since: JPA 2.0 boolean hasSingleIdAttribute () Whether the identifiable type has a single id attribute. Returns true for a simple id or embedded id; returns false for an idclass. Return: boolean indicating whether the identifiable type has a single id attribute Since: JPA 2.0 boolean

[ODB1] Chapter 3 - Persistent Classes

predefined system types are also persistent types: All the primitive types - boolean , byte , short , char , int , long , float and double . Selected classes in package java.lang : Boolean , Byte , Short

[ODB1] Chapter 4 - JDO Metadata

: embedded value types: primitive type ( boolean , byte , short , char , int , long , float or double ) embedded wrapper ( Boolean , Byte , Short , Character , Integer , Long , Float or Double ) embedded

javax.jdo.spi.StateInterrogation

the request. For JDOHelper isXXX methods, which return boolean , the corresponding method in StateInterrogation returns Boolean . If the return value is null then the StateInterrogation does not ... . See Also: PersistenceManager.getObjectId (Object pc) PersistenceCapable() PersistenceManager.getObjectById (Object oid, boolean

javax.jdo.PersistenceManager

. See Also: evict (Object pc) Since: JDO 1.0 void evictAll ( boolean  subclasses, Class  ... RollbackOnly flag (see Transaction.setRollbackOnly ). Since: JDO 2.0 boolean getCopyOnAttach () Gets ... . Return: the JDOConnection instance Since: JDO 2.0 boolean getDetachAllOnCommit () Gets

javax.jdo.PersistenceManagerFactory

connection. Return: the user name for the data store connection. Since: JDO 1.0 boolean getCopyOnAttach ... nothing. This method never returns null . Return: the DataStoreCache Since: JDO 2.0 boolean getDetachAllOnCommit ... is not authorized for {@link JDOPermission} ("getMetadata") Since: JDO 2.2 boolean getIgnoreCache

javax.jdo.Transaction

: the transaction isolation level See Also: setIsolationLevel Since: JDO 2.2 boolean getNontransactionalRead ... of the nontransactionalRead property Since: JDO 1.0 boolean getNontransactionalWrite () If true , allows ... of the nontransactionalWrite property Since: JDO 1.0 boolean getOptimistic () Optimistic transactions do not hold

javax.jdo.spi.StateManager

boolean getBooleanField (PersistenceCapable pc, int field,  boolean   ... of the calling instance Since: JDO 2.0 boolean isDeleted (PersistenceCapable pc) Tests ... .deletePersistent (Object pc) Since: JDO 1.0 boolean isDirty (PersistenceCapable pc) Tests

javax.jdo.Query

the Boolean expression of the filter. The element passes the filter if there exist unique values ... Since: JDO 2.0 boolean getIgnoreCache () Get the ignoreCache option setting. Return: the ignoreCache ... associated with this Query . Since: JDO 1.0 boolean isUnmodifiable () The unmodifiable flag

javax.jdo.spi.PersistenceCapable

(Object pc) PersistenceManager.getObjectById (Object oid, boolean validate) Since: JDO 1.0 ... .getObjectById (Object oid, boolean validate) Since: JDO 1.0 Object jdoGetVersion () Return the version of this instance. Return: the version Since: JDO 2.0 boolean jdoIsDeleted () Tests whether this object

javax.jdo.JDOHelper

() PersistenceManager.getObjectById (Object oid, boolean validate) Since: JDO 1.0 Collection getObjectIds ... () PersistenceManager.getObjectById (Object oid, boolean validate) Since: JDO 1.0 Object getVersion ... of the instance Since: JDO 2.0 boolean isDeleted (Object pc) Tests whether the parameter instance

javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache

,  boolean  subclasses) Since: JDO 2.0 void evictAll (Collection oids) Since: JDO 2.0 void evictAll (Object... oids) Since: JDO 2.0 void evictAll ( boolean  subclasses, Class ... ;pcClass,  boolean  subclasses) Since: JDO 2.0 void pinAll (Collection oids) Since: JDO 2.0

javax.jdo.spi.JDOImplHelper

boolean nonBinaryCompatibleIs (Object pc, JDOImplHelper.StateInterrogationBooleanReturn  ... StateInterrogation instances until one of them handles the call (returns a non-null Boolean with the answer ... to the non-binary-compatible implementation Return: Boolean .TRUE if the instance satisfies the state

javax.jdo.FetchGroup

- if the FetchGroup is unmodifiable Since: JDO 2.2 boolean equals (Object other) Return ... the factory method. Return: the name Since: JDO 2.2 boolean getPostLoad () Get the post-load property ... : the hash code Since: JDO 2.2 boolean isUnmodifiable () Return whether this FetchGroup