Home » Search

About long

61-70 of 200 Refresh
Forum
2

Possible issue with timestamps

().commit();              TypedQuery< Long> query = em.createQuery("SELECT count(c) FROM CDI c", Long.class);         Long cdiCount = query.getSingleResult();         assertEquals(22, cdiCount.intValue ... '2012-03-29 00:00:00'} and c.creationDate < {ts '2012-03-29 00:59:00'}", Long.class
Forum
2

Date field Index is corrupted due to time change

");         em.getTransaction().begin();         Long r = ( Long) q.getSingleResult();         em ... COUNT(r) FROM DateTime AS r");         em.getTransaction().begin();         r = ( Long) q ... roundDownDateTime(Date dateTime) {         long dateTimeMs = dateTime.getTime();         long
Forum
2

Is it possible to remove parent/child entities without refresh?

  private long id;   @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy ... (this);    children.put(child.getChildName(), child);   }   public long getId() {    return id;   }   public void setId( long id) {    this.id = id;   } } @Entity public static class ChildEntity
Forum
2

Visibility of changes in Transaction is not visible to a JPA QL Query

to see that they have been added long newTotal = -1;   try {    InitialContext context = new ... = (SLSBObjDbRemote) context      .lookup("SLSBObjDb");    long oldAmount = bean.countItems();    bean.addItems ... go to count them; TypedQuery< Long> q = em.createQuery("SELECT COUNT(x) FROM Item x", Long.class
Forum
2

Wrong data stored in time only fields

DateTime AS r");         Long r = ( Long) q.getSingleResult();                 System.out.println ... ) {         long dateTimeMs = dateTime.getTime();         long reminderMs  = dateTimeMs % 1000 ... ",         allocationSize=1     )     public static class DateTime {         private Long id
Issue
2

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Account extends AbstractEntity implements IAbstractEntity< Long> { @Id @Column(name = "account_id") @GeneratedValue(strategy= GenerationType.TABLE) protected Long id; @Override public Long getId() { return id; } @Override public void setId
JPA Doc
2

count(x)

Method javax.persistence.criteria.CriteriaBuilder Expression< Long> count(   Expression  x ) Create an aggregate expression applying the count operation. Parameters: x - expression representing input value to count operation Returns: count expression Since: JPA 2.0
JPA Doc
2

countDistinct(x)

Method javax.persistence.criteria.CriteriaBuilder Expression< Long> countDistinct(   Expression  x ) Create an aggregate expression applying the count distinct operation. Parameters: x - expression representing input value to count distinct operation Returns: count distinct expression Since: JPA 2.0
JDO Doc
2

deletePersistentAll()

Method javax.jdo.Query long deletePersistentAll() Deletes all the instances of the candidate class that pass the filter. Returns the number of instances of the candidate class that were deleted, specifically not including the number of dependent and embedded instances. Dirty instances of affected
JDO Doc
2

deletePersistentAll(parameters)

Method javax.jdo.Query long deletePersistentAll(   Map parameters ) Deletes all the instances of the candidate class that pass the filter. Parameters: parameters - for the query Returns: the number of instances of the candidate class that were deleted Since: JDO 2.0 See Also: deletePersistentAll()