Package oracle.toplink.queryframework

Examples of oracle.toplink.queryframework.ReadObjectQuery


  public Object readById(final Class entityClass, final Object[] keys, final boolean enforceReadOnly)
      throws DataAccessException {

    Assert.isTrue(keys != null && keys.length > 0, "Non-empty keys or id is required");

    ReadObjectQuery query = new ReadObjectQuery(entityClass);
    query.setSelectionKey(new Vector(Arrays.asList(keys)));
    Object result = executeQuery(query, enforceReadOnly);

    if (result == null) {
      Object identifier = (keys.length == 1 ? keys[0] : StringUtils.arrayToCommaDelimitedString(keys));
      throw new ObjectRetrievalFailureException(entityClass, identifier);
View Full Code Here


  public Object readById(final Class entityClass, final Object[] keys, final boolean enforceReadOnly)
      throws DataAccessException {

    Assert.isTrue(keys != null && keys.length > 0, "Non-empty keys or id is required");

    ReadObjectQuery query = new ReadObjectQuery(entityClass);
    query.setSelectionKey(new Vector(Arrays.asList(keys)));
    Object result = executeQuery(query, enforceReadOnly);

    if (result == null) {
      Object identifier = (keys.length == 1 ? keys[0] : StringUtils.arrayToCommaDelimitedString(keys));
      throw new ObjectRetrievalFailureException(entityClass, identifier);
View Full Code Here

   */
  @SuppressWarnings("boxing")
  public Developer readDeveloperById(int id) throws DataAccessException {

    Developer d = new Developer();
    ReadObjectQuery read = new ReadObjectQuery(Developer.class);
    d.setIdDeveloper(id);
    read.setExampleObject(d);

    Object o = getTopLinkTemplate().executeQuery(read);
    return (o != null) ? (Developer) o : null;
  }
View Full Code Here

  @SuppressWarnings("boxing")
  public Developer readAndLockDeveloperById(int id)
      throws DataAccessException {

    Developer d = new Developer();
    ReadObjectQuery read = new ReadObjectQuery(Developer.class);
    d.setIdDeveloper(id);
    read.setExampleObject(d);
    read.acquireLocksWithoutWaiting();

    Object o = getTopLinkTemplate().executeQuery(read);
    return (o != null) ? (Developer) o : null;
  }
View Full Code Here

   */
  @SuppressWarnings("boxing")
  public Developer readDeveloperById(int id) throws DataAccessException {

    Developer d = new Developer();
    ReadObjectQuery read = new ReadObjectQuery(Developer.class);
    d.setIdDeveloper(id);
    read.setExampleObject(d);

    Object o = getTopLinkTemplate().executeQuery(read);
    return (o != null) ? (Developer) o : null;
  }
View Full Code Here

TOP

Related Classes of oracle.toplink.queryframework.ReadObjectQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.