Package com.orientechnologies.orient.core.config

Examples of com.orientechnologies.orient.core.config.OStorageConfiguration


  private final List<OClusterMemory>  clusters          = new ArrayList<OClusterMemory>();
  private int                          defaultClusterId  = 0;

  public OStorageMemory(final String iURL) {
    super(iURL, OEngineMemory.NAME + ":" + iURL, "rw");
    configuration = new OStorageConfiguration(this);
  }
View Full Code Here


      if (!(iValue instanceof String) && !iFieldType.isAssignableFrom(iValue.getClass()))
        throw new IllegalArgumentException("Property '" + iFieldName + "' of type '" + iFieldType
            + "' can't accept value of type: " + iValue.getClass());
    } else if (Date.class.isAssignableFrom(iFieldType)) {
      if (iValue instanceof String && _database != null) {
        final OStorageConfiguration config = _database.getStorage().getConfiguration();

        DateFormat formatter = config.getDateFormatInstance();

        if (((String) iValue).length() > config.dateFormat.length()) {
          // ASSUMES YOU'RE USING THE DATE-TIME FORMATTE
          formatter = config.getDateTimeFormatInstance();
        }

        try {
          Date newValue = formatter.parse((String) iValue);
          // _fieldValues.put(iFieldName, newValue);
View Full Code Here

    if (Pattern.matches("^\\d+$", stringValue)) {
      return new Date(Long.valueOf(stringValue).longValue());
    }

    final OStorageConfiguration config = iRecord.getDatabase().getStorage().getConfiguration();

    DateFormat formatter = config.getDateFormatInstance();

    if (stringValue.length() > config.dateFormat.length()) {
      // ASSUMES YOU'RE USING THE DATE-TIME FORMATTE
      formatter = config.getDateTimeFormatInstance();
    }

    try {
      return formatter.parse(stringValue);
    } catch (ParseException pe) {
View Full Code Here

                                                                                          // POST OPEN

    try {
      openRemoteDatabase();

      configuration = new OStorageConfiguration(this);
      configuration.load();

    } catch (Exception e) {
      if (!OGlobalConfiguration.STORAGE_KEEP_OPEN.getValueAsBoolean())
        close();
View Full Code Here

    lock.acquireExclusiveLock();

    try {
      openRemoteDatabase(iUserName, iUserPassword);

      configuration = new OStorageConfiguration(this);
      configuration.load();

    } catch (Exception e) {
      if (!OGlobalConfiguration.STORAGE_KEEP_OPEN.getValueAsBoolean())
        close();
View Full Code Here

    final boolean locked = lock.acquireExclusiveLock();

    try {
      openRemoteDatabase(iUserName, iUserPassword);

      configuration = new OStorageConfiguration(this);
      configuration.load();

    } catch (Exception e) {
      if (!OGlobalConfiguration.STORAGE_KEEP_OPEN.getValueAsBoolean())
        close();
View Full Code Here

    if (Pattern.matches("^\\d+$", stringValue)) {
      return new Date(Long.valueOf(stringValue).longValue());
    }

    final OStorageConfiguration config = iRecord.getDatabase().getStorage().getConfiguration();

    DateFormat formatter = config.getDateFormatInstance();

    if (stringValue.length() > config.dateFormat.length()) {
      // ASSUMES YOU'RE USING THE DATE-TIME FORMATTE
      formatter = config.getDateTimeFormatInstance();
    }

    try {
      return formatter.parse(stringValue);
    } catch (ParseException pe) {
View Full Code Here

  private int                          defaultClusterId  = 0;
  private ODictionary<?>              dictionary;

  public OStorageMemory(final String iURL) {
    super(iURL, iURL, "rw");
    configuration = new OStorageConfiguration(this);
  }
View Full Code Here

    if (Pattern.matches("^\\d+$", stringValue)) {
      return new Date(Long.valueOf(stringValue).longValue());
    }

    final OStorageConfiguration config = iRecord.getDatabase().getStorage().getConfiguration();

    DateFormat formatter = config.getDateFormatInstance();

    if (stringValue.length() > config.dateFormat.length()) {
      // ASSUMES YOU'RE USING THE DATE-TIME FORMATTE
      formatter = config.getDateTimeFormatInstance();
    }

    try {
      return formatter.parse(stringValue);
    } catch (ParseException pe) {
View Full Code Here

      if (!(iValue instanceof String) && !iType.isAssignableFrom(iValue.getClass()))
        throw new IllegalArgumentException("Property '" + iPropertyName + "' of type '" + iType + "' can't accept value of type: "
            + iValue.getClass());
    } else if (Date.class.isAssignableFrom(iType)) {
      if (iValue instanceof String && _database != null) {
        final OStorageConfiguration config = _database.getStorage().getConfiguration();

        DateFormat formatter = config.getDateFormatInstance();

        if (((String) iValue).length() > config.dateFormat.length()) {
          // ASSUMES YOU'RE USING THE DATE-TIME FORMATTE
          formatter = config.getDateTimeFormatInstance();
        }

        try {
          Date newValue = formatter.parse((String) iValue);
          // _fieldValues.put(iPropertyName, newValue);
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.config.OStorageConfiguration

Copyright © 2018 www.massapicom. 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.