About class

91-100 of 200Refresh
Forum
15

Duplicate Entity class names causes Exception in Query

I have two Entities which have the same class name but reside in different packages, only one of them is mentioned in the persistence.xml. I a NamedQuery I use the unqualified class name ... ) ... 64 more Here is the class doing the query on objdbTest.Item package objdbTest; import
Forum
15

Using the wrong class to access a database

; // imports public class Main { public static void main(String[] args) { run(); } static void run() { System.out.println("Test 1"); System.out.println("Point.class: " + Point.class ... Point p", Point.class); List results = query.getResultList(); System.out.println
Issue
15

Super class' field access fails

I have a base class: public abstract class HotObject extends BaseObject { private Integer ... ; } }   And I have an inherited class: @Entity public class HotTag extends HotObject implements ... = em.createQuery("SELECT t FROM HotTag t ORDER BY t.activity DESC", HotTag.class); I get the exception
Forum
15

Problem to use find method on an abstract Class: AbstractMethodError is thrown

mentioning LogicalObject I get AbstractMethodError Please see services.Tester class with the 2 options ... .datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class ... $$$view3.test(Unknown Source) [classes:] at services.PaltzefomatServlet.doPost(PaltzefomatServlet
Forum
15

Field not persisted in abstract class with two level of nesting

Hi, I have a field (embedded TZ1) which is not persisted in class MHD1 (TZ1  extends AS and AS ... public class MHD1 implements Serializable{     private TZ1 timezone;     public MHD1 ... ; @Embeddable public class TZ1  extends AS{     TZ1() {     }         public TZ1(String v
Issue
15

No Entity Class API

Both JPA and JDO are based on accessing and managing data in the database using persistable classes (mainly entity classes in JPA or persistence capable classes in JDO). Usually, this is very convenient. Sometimes, however, it might be useful to access data without user defined persistable classes
Forum
15

query on calendar class

Hello!   I'm looking for help to build query on calendar class. I need to get objects where Calendar.DAY_OF_WEEK is FRIDAY or any other. My class: @Entity public class Cdr {     private static ... =em.createQuery("SELECT c FROM Cdr c where c.start.DAY_OF_WEEK = ?1",Cdr.class); query.setParameter
Manual
15

Paths and Types in JPQL and Criteria API

Instances of user defined persistable classes (entity classes, mapped super classes and embeddable classes) are represented in JPQL by the following types of expressions: Variables - FROM identification variables and SELECT result variables. Parameters - when instances of these classes are assigned
Manual
15

FROM clause (JPQL / Criteria API)

identification variables that iterate over all the database objects of a specific entity class hierarchy (i.e. an entity class and all its descendant entity classes). Identification variables are always polymorphic. JPQL does not provide a way to exclude descendant classes from iteration
Manual
15

JPA Named Queries

is attached to exactly one entity class or mapped superclass - usually to the most relevant entity class. But since the scope of named queries is the entire persistence unit, names should be selected ... to add the above @NamedQuery to the Country entity class: @Entity @NamedQuery(name="Country.findAll