Examples of PkGenerator


Examples of ar.com.AmberSoft.util.PKGenerator

  private Set<Permission> permissions;
 
  @Id @Column (name="id_perfil")
  public Integer getId() {
    if (id==null){
      PKGenerator pkGenerator = new PKGenerator();
      id = new Integer(pkGenerator.getIntLastTime());
    }
    return id;
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

  private Integer executions;
  private Set<Relation> relations;
  private Set<Relation> relationsAvaiables;

  public Event (){
    PKGenerator pkGenerator = new PKGenerator();
    id = new Integer(pkGenerator.getIntLastTime());
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

  }

  @Id @Column (name="id_tarea")
  public Integer getId() {
    if (id==null){
      PKGenerator pkGenerator = new PKGenerator();
      id = new Integer(pkGenerator.getIntLastTime());
    }
    return id;
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

  private Integer cumplimiento;
 
  @Id @Column (name="id_objetivo")
  public Integer getId() {
    if (id==null){
      PKGenerator pkGenerator = new PKGenerator();
      id = new Integer(pkGenerator.getIntLastTime());
    }
    return id;
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

  public void setVisibles(Set<VisibleRelation> visibles) {
    this.visibles = visibles;
  }
 
  public Relation(){
    PKGenerator pkGenerator = new PKGenerator();
    id = new Integer(pkGenerator.getIntLastTime());
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

  public void setTarea(Tarea tarea) {
    this.tarea = tarea;
  }

  public Comentario(){
    PKGenerator pkGenerator = new PKGenerator();
    id_comentario = new Integer(pkGenerator.getIntLastTime());
  }
View Full Code Here

Examples of ar.com.AmberSoft.util.PKGenerator

    map.put(ParamsConst.PAGING_LOAD_RESULT, Boolean.TRUE);
    return map;
  }

  public static void addTarea(Collection<Tarea> list) {
    PKGenerator generator = new PKGenerator();
    Tarea tarea = new Tarea();
    tarea.setId(generator.getIntLastTime());
    tarea.setNombreTarea("Tarea" + generator.getPk());
    tarea.setFechaComienzo(new Date());
    tarea.setFechaFin(new Date());
    //tarea.setDuracion(String.valueOf(generator.getLastTime()));
    tarea.setDescripcion("Descripcion" + generator.getPk());
    tarea.setId_usuario(generator.getPk());

    Comentario comentario = new Comentario();
    comentario.setComentario("Comentarios" + generator.getPk());
    comentario.setFecha(new Date());
    comentario.setUsuario("USERTEST");
    Set comentarios = new HashSet();
    comentarios.add(comentario);
    tarea.setComentarios(comentarios);

    Set<Visible> visibles = new HashSet<Visible>();
    setVisible(tarea, visibles, "1");
    setVisible(tarea, visibles, "3");
    setVisible(tarea, visibles, "5");
    tarea.setVisibles(visibles);
   
    Tarea tarea2 = new Tarea();
    tarea2.setId(generator.getIntLastTime());
    tarea2.setNombreTarea("Tarea" + generator.getPk());
    tarea2.setFechaComienzo(new Date());
    tarea2.setFechaFin(new Date());
    tarea2.setDescripcion("Descripcion" + generator.getPk());
    tarea2.setId_usuario(generator.getPk());
    Set subtareas = new HashSet();
    subtareas.add(tarea2);
    tarea.setSubtareas(subtareas);
       
    list.add(tarea);
View Full Code Here

Examples of org.apache.cayenne.dba.PkGenerator

            // build constraints
            createConstraints.put(name, createConstraintsQueries(dbe));
        }

        PkGenerator pkGenerator = adapter.getPkGenerator();
        dropPK = pkGenerator.dropAutoPkStatements(dbEntitiesRequiringAutoPK);
        createPK = pkGenerator.createAutoPkStatements(dbEntitiesRequiringAutoPK);
    }
View Full Code Here

Examples of org.apache.cayenne.dba.PkGenerator

            // build constraints
            createConstraints.put(name, createConstraintsQueries(dbe));
        }

        PkGenerator pkGenerator = adapter.getPkGenerator();
        dropPK = pkGenerator.dropAutoPkStatements(dbEntitiesRequiringAutoPK);
        createPK = pkGenerator.createAutoPkStatements(dbEntitiesRequiringAutoPK);
    }
View Full Code Here

Examples of org.apache.cayenne.dba.PkGenerator

    public void testCommitChangesError() {
        DataContext context = createDataContext();

        // setup mockup PK generator that will blow on PK request
        // to emulate an exception
        PkGenerator newGenerator = new JdbcPkGenerator(new JdbcAdapter()) {

            @Override
            public Object generatePk(DataNode node, DbAttribute pk) throws Exception {
                throw new CayenneRuntimeException("Intentional");
            }
        };

        PkGenerator oldGenerator = getNode().getAdapter().getPkGenerator();
        JdbcAdapter adapter = (JdbcAdapter) getNode().getAdapter();

        adapter.setPkGenerator(newGenerator);
        try {
            Artist newArtist = context.newObject(Artist.class);
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.