A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Code Examples of UpdateQuery



    /**
     * Helper method to update a single column in a database row.
     */
    protected void updateRow(ObjectId id, String dbAttribute, Object newValue) {
        UpdateQuery updateQuery = new UpdateQuery();
        updateQuery.setRoot(id.getEntityName());
        updateQuery.addUpdAttribute(dbAttribute, newValue);

        // set qualifier
        updateQuery.setQualifier(ExpressionFactory.matchAllDbExp(
                id.getIdSnapshot(),
                Expression.EQUAL_TO));

        getDomain().onQuery(null, updateQuery);
    }

View Full Code Here



				int listIndex = 0;
				
				for (RemoteType value : values) {

					UpdateQuery query = new UpdateQuery(connection, false, insertSQL);

					setKey(query, bean);

					setValue(value, query);

					if(preserveListOrder){
						
						query.setInt(3, listIndex);
						listIndex++;
					}
					
					query.executeUpdate();
				}
			}

		} catch (IllegalArgumentException e) {

View Full Code Here



	public UpdateQuery getUpdateQuery(String sqlExpression) throws SQLException {

		this.checkStatus();

		UpdateQuery query = new UpdateQuery(connection, false, sqlExpression);

		checkQueryList();
		
		this.queryList.add(query);

View Full Code Here


			for(RemoteType remoteBean : remoteBeans){
			
				//Set new relations
				UpdateQuery insertQuery;
				
				insertQuery = new UpdateQuery(connection, false, linkTableInsertSQL);
				
				setQueryParameter(insertQuery, this.localColumn, bean, 1);
				setQueryParameter(insertQuery, this.remoteColumn, remoteBean, 2);
				
				insertQuery.executeUpdate();

View Full Code Here

TOP

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

TOP