Codota Logo
Property.getDecimal
Code IndexAdd Codota to your IDE (free)

How to use
getDecimal
method
in
javax.jcr.Property

Best Java code snippets using javax.jcr.Property.getDecimal (Showing top 20 results out of 315)

  • Common ways to obtain Property
private void myMethod () {
Property p =
  • Codota IconNode node;String name;String value;node.setProperty(name, value)
  • Codota IconNode node;String relPath;node.getProperty(relPath)
  • Codota IconPropertyIterator iter;iter.nextProperty()
  • Smart code suggestions by Codota
}
origin: net.adamcin.oakpal/oakpal-core

@Override
public BigDecimal getDecimal() throws RepositoryException {
  return delegate.getDecimal();
}
origin: org.onehippo.cms7/hippo-repository-connector

public BigDecimal getDecimal() throws ValueFormatException, RepositoryException {
  return property.getDecimal();
}
origin: net.adamcin.commons/net.adamcin.commons.jcr

public BigDecimal getDecimal() throws RepositoryException
{ return this.item.getDecimal(); }
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Returns the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param baseNode  existing node that should be the base for the relative path
 * @param relPath  relative path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Node baseNode, String relPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return baseNode.getProperty(relPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: org.onehippo.cms7/hippo-repository-api

/**
 * Returns the decimal property value at <code>relPath</code> from <code>baseNode</code> or
 * <code>defaultValue</code> if no such property exists.
 *
 * @param baseNode     existing node that should be the base for the relative path
 * @param relPath      relative path to the property to get
 * @param defaultValue default value to return when the property does not exist
 * @return the decimal property value at <code>relPath</code> from <code>baseNode</code> or
 *         <code>defaultValue</code> if no such property exists
 * @throws RepositoryException in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Node baseNode, String relPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return baseNode.getProperty(relPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Returns the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param baseNode  existing node that should be the base for the relative path
 * @param relPath  relative path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Node baseNode, String relPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return baseNode.getProperty(relPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: apache/jackrabbit

/**
 * Returns the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param baseNode  existing node that should be the base for the relative path
 * @param relPath  relative path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>relPath</code> from <code>baseNode</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Node baseNode, String relPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return baseNode.getProperty(relPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: info.magnolia/magnolia-core

@Override
public BigDecimal getDecimal() throws ValueFormatException, RepositoryException {
  return getWrappedProperty().getDecimal();
}
origin: apache/jackrabbit

/**
 * Tests if adding a property with <code>Node.setProperty(String,
 * BigDecimal)</code> works with <code>Session.save()</code>
 */
public void testNewDecimalPropertySession() throws Exception {
  testNode.setProperty(propertyName1, b1);
  superuser.save();
  assertEquals("Setting property with Node.setProperty(String, double) and Session.save() not working",
      b1,
      testNode.getProperty(propertyName1).getDecimal());
}
origin: apache/jackrabbit

/**
 * Tests if modifying a property with <code>Node.setProperty(String,
 * BigDecimal)</code> works with <code>Session.save()</code>
 */
public void testModifyDecimalPropertySession() throws Exception {
  testNode.setProperty(propertyName1, b1);
  superuser.save();
  testNode.setProperty(propertyName1, b2);
  superuser.save();
  assertEquals("Modifying property with Node.setProperty(String, double) and Session.save() not working",
      b2,
      testNode.getProperty(propertyName1).getDecimal());
}
origin: brix-cms/brix-cms

  public BigDecimal execute() throws Exception {
    return getDelegate().getDecimal();
  }
});
origin: org.onehippo.cms7/hippo-repository-api

/**
 * Returns the decimal property value at <code>absPath</code> or <code>defaultValue</code> if no such property
 * exists.
 *
 * @param session      to use
 * @param absPath      absolute path to the property to get
 * @param defaultValue default value to return when the property does not exist
 * @return the decimal property value at <code>absPath</code> or <code>defaultValue</code> if no such property
 *         exists
 * @throws RepositoryException in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Session session, String absPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return session.getProperty(absPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Returns the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param session to use
 * @param absPath  absolute path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Session session, String absPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return session.getProperty(absPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: apache/jackrabbit

/**
 * Returns the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param session to use
 * @param absPath  absolute path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Session session, String absPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return session.getProperty(absPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Returns the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists.
 *
 * @param session to use
 * @param absPath  absolute path to the property to get
 * @param defaultValue  default value to return when the property does not exist
 * @return  the decimal property value at <code>absPath</code> or <code>defaultValue</code>
 * if no such property exists
 * @throws RepositoryException  in case of exception accessing the Repository
 */
public static BigDecimal getDecimalProperty(Session session, String absPath, BigDecimal defaultValue) throws RepositoryException {
  try {
    return session.getProperty(absPath).getDecimal();
  } catch (PathNotFoundException e) {
    return defaultValue;
  }
}
origin: com.btmatthews.atlas/atlas-jcr

public BigDecimal getBigDecimalProperty(final Node node, final String name, final BigDecimal defaultValue) {
  try {
    return node.getProperty(name).getDecimal();
  } catch (final PathNotFoundException e) {
    return defaultValue;
  } catch (final RepositoryException e) {
    throw new RepositoryAccessException(e.getMessage(), e);
  }
}
origin: brix-cms/brix-cms

public BigDecimal getDecimal(Property property) throws RepositoryException {
  if (getPrevious() != null) {
    return getPrevious().getDecimal(property);
  } else {
    return property.getDecimal();
  }
}
origin: info.magnolia/magnolia-core

@Test
public void testSetValueWithBigDecimal() throws Exception {
  MockNode node = new MockNode("parent");
  Property property = new MockProperty("test", BigDecimal.valueOf(0), node);
  property.setValue(BigDecimal.ONE);
  assertEquals(BigDecimal.ONE, property.getDecimal());
}
origin: info.magnolia/magnolia-core

@Test
public void setPropertyToBigDecimal() throws Exception {
  // GIVEN
  final Object value = BigDecimal.ONE;
  PropertyUtil.setProperty(root, PROPERTY_NAME, value);
  // WHEN
  BigDecimal res = root.getProperty(PROPERTY_NAME).getDecimal();
  // THEN
  assertEquals(value, res);
}
origin: info.magnolia/magnolia-core

@Test
public void testGetProperties() throws Exception {
  root.setProperty("property1", "string");
  root.setProperty("property2", BigDecimal.TEN);
  PropertyIterator iterator = root.getProperties();
  assertTrue(iterator.hasNext());
  Property current = iterator.nextProperty();
  assertEquals("property1", current.getName());
  assertEquals("string", current.getString());
  current = iterator.nextProperty();
  assertEquals("property2", current.getName());
  assertEquals(BigDecimal.TEN, current.getDecimal());
  assertTrue(!iterator.hasNext());
}
javax.jcrPropertygetDecimal

Javadoc

Returns a BigDecimal representation of the value of this property. A shortcut for Property.getValue().getDecimal().

Popular methods of Property

  • getString
    Returns a String representation of the value of this property. A shortcut for Property.getValue().g
  • getValues
    Returns an array of all the values of this property. Used to access multi-value properties. The arra
  • getValue
    Returns the value of this property as a Value object. The object returned is a copy of the stored va
  • getName
  • getType
    Returns the type of this Property. One of: * PropertyType.STRING * PropertyType.BINARY * Property
  • getBinary
    Returns a Binary representation of the value of this property. A shortcut for Property.getValue().g
  • getBoolean
    Returns a boolean representation of the value of this property. A shortcut for Property.getValue().
  • remove
  • isMultiple
    Returns true if this property is multi-valued andfalse if this property is single-valued.
  • getDate
    Returns a Calendar representation of the value of this property. A shortcut for Property.getValue()
  • getLong
    Returns a long representation of the value of this property. A shortcut for Property.getValue().get
  • getDefinition
    Returns the property definition that applies to this property. In some cases there may appear to be
  • getLong,
  • getDefinition,
  • setValue,
  • getParent,
  • getPath,
  • getNode,
  • getLength,
  • getDouble,
  • getStream,
  • getSession

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BoxLayout (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now