Examples of byId()


Examples of com.esri.sde.sdk.client.SeDelete.byId()

                    IOException {
                try {
                    // A call to SeDelete.byId immediately deletes the row from the
                    // database. The application does not need to call execute()
                    // try{
                    seDelete.byId(qualifiedName, objectID);
                    // }catch(SeException e){
                    // final int FID_DOESNT_EXIST = -22;
                    // if(e.getSeError().getSdeError() == FID_DOESNT_EXIST){
                    // //ignore
                    // }else{
View Full Code Here

Examples of com.esri.sde.sdk.client.SeDelete.byId()

        session.issue(new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeDelete delete = new SeDelete(connection);
                delete.byId(typeName, new SeObjectId(rowId));
                delete.close();
                return null;
            }
        });
View Full Code Here

Examples of com.google.gerrit.common.data.ApprovalTypes.byId()

      for (PatchSetApproval a : approvals) {
        if (a.getValue() == 0) {
          continue;
        }

        ApprovalType t = types.byId(a.getCategoryId());
        if (t == null) {
          continue;
        }

        StructureTerm labelTerm = new StructureTerm(
View Full Code Here

Examples of org.hibernate.Session.byId()

    final World[] worlds = new World[queries];
    final Random random = ThreadLocalRandom.current();
    final Session session = sessionFactory.openSession();
   
    for (int i = 0; i < queries; i++) {
        worlds[i] = (World) session.byId(World.class).load(random.nextInt(DB_ROWS) + 1);
    }
   
    session.close();
    return queries == 1 ? worlds[0] : worlds;
  }
View Full Code Here

Examples of org.hibernate.Session.byId()

                final World[] worlds = new World[queries];
                final Session session = HibernateUtil.getSession();
                final Random random = ThreadLocalRandom.current();
               
                for (int i = 0; i < queries; i++) {
                    worlds[i] = (World) session.byId(World.class).load(random.nextInt(DB_ROWS) + 1);
                }
               
                return (request.queryParams("queries") == null ? worlds[0] : worlds);
            }
           
View Full Code Here

Examples of org.hibernate.Session.byId()

        Session session = sessionManager.getSession();
        Transaction transaction = null;
        try {
            transaction = session.beginTransaction();
            SqlWorkspace sqlWorkspace = (SqlWorkspace) session.byId(SqlWorkspace.class).load(workspace.getWorkspaceId());
            List<SqlWorkspaceUser> sqlWorkspaceUsers = sqlWorkspace.getSqlWorkspaceUserList();
            boolean updateUser = false;
            for (SqlWorkspaceUser sqlWorkspaceUser : sqlWorkspaceUsers) {
                if (sqlWorkspaceUser.getUser().getUserId().equals(userId)) {
                    updateUser = true;
View Full Code Here

Examples of org.hibernate.Session.byId()

     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public T get(PK id) {
        Session sess = getSession();
        IdentifierLoadAccess byId = sess.byId(persistentClass);
        T entity = (T) byId.load(id);

        if (entity == null) {
            log.warn("Uh oh, '" + this.persistentClass + "' object with id '" + id + "' not found...");
            throw new ObjectRetrievalFailureException(this.persistentClass, id);
View Full Code Here

Examples of org.hibernate.Session.byId()

     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public boolean exists(PK id) {
        Session sess = getSession();
        IdentifierLoadAccess byId = sess.byId(persistentClass);
        T entity = (T) byId.load(id);
        return entity != null;
    }

    /**
 
View Full Code Here

Examples of org.hibernate.Session.byId()

    /**
     * {@inheritDoc}
     */
    public void remove(PK id) {
        Session sess = getSession();
        IdentifierLoadAccess byId = sess.byId(persistentClass);
        T entity = (T) byId.load(id);
        sess.delete(entity);
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.