ComActivity

UPDATE

    public boolean updateTable(){
       
        Environment env = Environment.getStandardEnvironment(processData);
        Database db = SystemWorkspace.getConnectionsWorkspace().getDatabase("Repository", env);
        Table table = RepositoryUtil.getTable("Repository", "Table");
        UpdateStatement updTable = new UpdateStatement(table, env.getSessionValues(), env.getDataTypeHandler(), db);
        updTable.addColumnValue("CHAMP1", "VALEUR1");
        updTable.addColumnValue("CHAMP2", "VALEUR2");

Etiquettes: 

DELETE

    public boolean deleteTable(){
       
        Environment env = Environment.getStandardEnvironment(processData);
        Database db = SystemWorkspace.getConnectionsWorkspace().getDatabase("MOVEX", env);
        Table table = RepositoryUtil.getTable("Repository", "Table");
        DeleteStatement delTable = new DeleteStatement(table, env.getSessionValues(), env.getDataTypeHandler(), db);
        delTable.addWhere("CHAMP1", "VALEUR1");
        delTable.addWhere("CHAMP2", "VALEUR2");

Etiquettes: 

INSERT


public boolean insertTable(){
       
        Environment env = Environment.getStandardEnvironment(processData);
        Database db = SystemWorkspace.getConnectionsWorkspace().getDatabase("MOVEX", env);
        Table table = RepositoryUtil.getTable("Repository", "Table");
        InsertStatement insTable = new InsertStatement(table, env.getSessionValues(), env.getDataTypeHandler(), db);
        insTable.addColumnValue("CHAMP1", "VALEUR1");
        insTable.addColumnValue("CHAMP2", "VALEUR2");

Etiquettes: 

SELECT

ArrayList<String[]> selectTable(){
        ArrayList<String[]> result = new ArrayList<String[]>();
        Environment env = Environment.getStandardEnvironment(processData);
        Database db = SystemWorkspace.getConnectionsWorkspace().getDatabase("NomDuRepository", env);

Etiquettes: