Examples of AttributeValue


Examples of com.amazonaws.services.dynamodbv2.model.AttributeValue

    private <T> Map<String, AttributeValue> getKey(T keyObject, Class<T> clazz) {
        Map<String, AttributeValue> key = new HashMap<String, AttributeValue>();
        for (Method keyGetter : reflector.getKeyGetters(clazz)) {
            Object getterResult = safeInvoke(keyGetter, keyObject);
            AttributeValue keyAttributeValue = getSimpleAttributeValue(keyGetter, getterResult);
            if (keyAttributeValue == null) {
                throw new DynamoDBMappingException("Null key found for " + keyGetter);
            }
            key.put(reflector.getAttributeName(keyGetter), keyAttributeValue);
        }

Examples of com.amazonaws.services.dynamodbv2.model.AttributeValue

                if ( reflector.isVersionAttributeGetter(method) ) {
                    Object getterResult = safeInvoke(method, object);
                    String attributeName = reflector.getAttributeName(method);

                    ExpectedAttributeValue expected = new ExpectedAttributeValue();
                    AttributeValue currentValue = getSimpleAttributeValue(method, getterResult);
                    expected.setExists(currentValue != null);
                    if ( currentValue != null )
                        expected.setValue(currentValue);
                    expectedValues.put(attributeName, expected);
                    break;

Examples of com.amazonaws.services.dynamodbv2.model.AttributeValue

            // Look at every getter and construct a value object for it
            for ( Method method : reflector.getRelevantGetters(clazz) ) {
                Object getterResult = safeInvoke(method, toWrite);
                String attributeName = reflector.getAttributeName(method);

                AttributeValue currentValue = null;
                if ( getterResult == null && reflector.isAssignableKey(method) ) {
                    currentValue = getAutoGeneratedKeyAttributeValue(method, getterResult);
                    inMemoryUpdates.add(new ValueUpdate(method, currentValue, toWrite));
                } else {
                    currentValue = getSimpleAttributeValue(method, getterResult);

Examples of com.amazonaws.services.dynamodbv2.model.AttributeValue

                if ( getterResult == null && reflector.isAssignableKey(method) ) {
                    onAutoGenerateAssignableKey(method, attributeName);
                }
               
                else {
                    AttributeValue newAttributeValue = getSimpleAttributeValue(method, getterResult);
                    if ( newAttributeValue == null ) {
                        throw new DynamoDBMappingException("Null or empty value for key: " + method);
                    }

                    onKeyAttributeValue(attributeName, newAttributeValue);
                }
            }

            /*
             * Next construct an update for every non-key property
             */
            for ( Method method : reflector.getRelevantGetters(clazz) ) {

                // Skip any key methods, since they are handled separately
                if ( keyGetters.contains(method) )
                    continue;

                Object getterResult = safeInvoke(method, object);
                String attributeName = reflector.getAttributeName(method);

                /*
                 * If this is a versioned field, update it
                 */
                if ( reflector.isVersionAttributeGetter(method) ) {
                    onVersionAttribute(method, getterResult, attributeName);
                    nonKeyAttributePresent = true;
                }

                /*
                 * Otherwise apply the update value for this attribute.
                 */
                else  {
                    AttributeValue currentValue = getSimpleAttributeValue(method, getterResult);
                    if ( currentValue != null ) {
                        updateValues.put(attributeName, new AttributeValueUpdate().withValue(currentValue)
                                .withAction("PUT"));
                        nonKeyAttributePresent = true;
                    } else {

Examples of com.amazonaws.services.dynamodbv2.model.AttributeValue

        protected List<ValueUpdate> getInMemoryUpdates() {
            return inMemoryUpdates;
        }
       
        private void onAutoGenerateAssignableKey(Method method, String attributeName) {
            AttributeValue newVersionValue = getAutoGeneratedKeyAttributeValue(method, null);
           
            updateValues.put(attributeName,
                    new AttributeValueUpdate().withAction("PUT").withValue(newVersionValue));
            inMemoryUpdates.add(new ValueUpdate(method, newVersionValue, object));
           

Examples of com.blazebit.ai.decisiontree.AttributeValue

        final TrieMap<Set<Example<T>>> exampleTrieMap = new TrieMap<Set<Example<T>>>();

        /* Fill values */
        for (final Example<T> example : examples) {
            final AttributeValue exampleAttributeValue = example.getValues().get(attribute);
            final String key = exampleAttributeValue == null ? "" : (String) exampleAttributeValue.getValue();
            Set<Example<T>> set = exampleTrieMap.get(key);
           
            if (set == null) {
                set = new HashSet<Example<T>>();
                exampleTrieMap.put(key, set);

Examples of com.ojn.gexf4j.core.data.AttributeValue

  }
 
  @Test
  public void getAttributeValues() {
    Attribute attrib = new AttributeImpl(AttributeType.STRING, "test", AttributeClass.EDGE);
    AttributeValue av = attrib.createValue("testing");
   
    int a = e.getAttributeValues().size();
    e.getAttributeValues().add(av);
    int b = e.getAttributeValues().size();
   

Examples of com.stimulus.archiva.security.realm.ADRealm.AttributeValue

                                String attrId = attr.getID();
                                /* print each value */
                                for (Enumeration vals = attr.getAll();vals.hasMoreElements();) {
                                    String value = vals.nextElement().toString();
                                    logger.debug("LDAP attribute: "+ attrId + " = " + value);
                                    attributeValues.add(new AttributeValue(attrId,value));
                                }
 
                            }
                        }
                }

Examples of com.sun.xacml.attr.AttributeValue

            throw new RuntimeException(e);
        }

        Set<Attribute> subjectAttributes = new HashSet<Attribute>(1 + role.getAttributes().size());

        AttributeValue roleAttributeValue = new AnyURIAttribute(roleURI);
        Attribute roleAttribute = new Attribute(XACMLConstants.RoleAttributeURI, null, null,
                roleAttributeValue);
        subjectAttributes.add(roleAttribute);

        for (Attribute attr : role.getAttributes()) {

Examples of com.sun.xacml.attr.AttributeValue

                    if (value instanceof Geometry) {
                        if (((Geometry) value).getUserData() == null)
                            throw new RuntimeException("Property: " + propertyName
                                    + " : Geometry must have srs name as userdata");
                    }
                    AttributeValue attrValue = createAttributeValueFromObject(value);
                    Attribute xacmlAttr = new Attribute(attr.getId(), null, null, attrValue);
                    role.getAttributes().add(xacmlAttr);
                }
            }
        }
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.