Examples of PropertyStore


Examples of org.apache.kato.tck.api.PropertyStore

    assertEquals("123456",array[0]);
   
  }
  public void testPropertyAsArraySeperatorAtFront() {

    PropertyStore a=new PropertyStore();
    a.setProperty("a", ",123456");
    String[] array=a.getPropertyAsArray("a",",");
    assertEquals("",array[0]);
    assertEquals("123456",array[1]);
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

    assertEquals("123456",array[1]);
   
  }
  public void testPropertyAsArraySeperatorAtEnd() {

    PropertyStore a=new PropertyStore();
    a.setProperty("a", "123456,");
    String[] array=a.getPropertyAsArray("a",",");
   
    assertEquals("123456",array[0]);
    assertEquals("",array[1]);
   
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

  }
 
 
  public void testPropertyAsArraySimpleArray() {

    PropertyStore a=new PropertyStore();
    a.setProperty("a", "1,2,3");
   
    String[] array=a.getPropertyAsArray("a",",");
    assertNotNull(array);
    assertEquals(3,array.length);
    assertEquals("1",array[0]);
    assertEquals("2",array[1]);
    assertEquals("3",array[2]);
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

    assertEquals("3",array[2]);
  }
 
  public void testNestedProperties() {
 
    PropertyStore a=new PropertyStore();
    a.setProperty("a", "123");
    a.setProperty("b", "${a}");
 
    String result=a.getProperty("b");
    assertEquals("123",result);
  }
View Full Code Here

Examples of org.apache.kato.tck.api.PropertyStore

    FileWriter fw = new FileWriter(outfile);
    PrintWriter pw = new PrintWriter(fw);
   
    pw.println("<tckconfig created=\"" + new Date()+"\">");
   
    PropertyStore s=store;
    while(s!=null) {
      writeStoreConfig(s,pw);
      s=s.getParent();
    }
       
    pw.println("</tckconfig>");
    pw.close();
 
View Full Code Here

Examples of org.exolab.jms.tools.migration.proxy.PropertyStore

        MasterConsumerStore masterConsumers
                = new MasterConsumerStore(_database);
        MasterUserStore masterUsers = new MasterUserStore(_database);

        // init proxy stores
        PropertyStore properties = new PropertyStore(source);
        VersionInfo info = new VersionInfo(properties);
        String schemaVersion = info.getProxySchemaVersion();
        if (schemaVersion == null || !schemaVersion.equals("1.0")) {
            throw new PersistenceException("Cannot import data: unsupported schema version: "
                                           + schemaVersion);
View Full Code Here

Examples of org.kmem.kosh.sftp.properties.PropertyStore

      public void handleEvent(Event e){
        if(e.type == SWT.Modify){
          if((m_store.getBoolean(IProperty.VERIFIED) == true&& (compare() == false)){
            //System.out.println("Widget was modified");
            m_store.setValue(IProperty.VERIFIED, false);
            if(m_backup == null) m_backup = new PropertyStore(m_store);
          }
        }
      }
    };
   
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore

    {
        if ( properties == null || properties.isEmpty() )
        {
            return Record.NO_NEXT_PROPERTY.intValue();
        }
        PropertyStore propStore = getPropertyStore();
        List<PropertyRecord> propRecords = new ArrayList<PropertyRecord>();
        PropertyRecord currentRecord = new PropertyRecord( propStore.nextId() );
        currentRecord.setInUse( true );
        currentRecord.setCreated();
        propRecords.add( currentRecord );
        for ( Entry<String, Object> entry : properties.entrySet() )
        {
            int keyId = indexHolder.getKeyId( entry.getKey() );
            if ( keyId == -1 )
            {
                keyId = createNewPropertyIndex( entry.getKey() );
            }

            PropertyBlock block = new PropertyBlock();
            propStore.encodeValue( block, keyId, entry.getValue() );
            if ( currentRecord.size() + block.getSize() > PropertyType.getPayloadSize() )
            {
                // Here it means the current block is done for
                PropertyRecord prevRecord = currentRecord;
                // Create new record
                long propertyId = propStore.nextId();
                currentRecord = new PropertyRecord( propertyId );
                currentRecord.setInUse( true );
                currentRecord.setCreated();
                // Set up links
                prevRecord.setNextProp( propertyId );
                currentRecord.setPrevProp( prevRecord.getId() );
                propRecords.add( currentRecord );
                // Now current is ready to start picking up blocks
            }
            currentRecord.addPropertyBlock( block );
        }
        /*
         * Add the property records in reverse order, which means largest
         * id first. That is to make sure we expand the property store file
         * only once.
         */
        for ( int i = propRecords.size() - 1; i >= 0; i-- )
        {
            propStore.updateRecord( propRecords.get( i ) );
        }
        /*
         *  0 will always exist, if the map was empty we wouldn't be here
         *  and even one property will create at least one record.
         */
 
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore

        return propRecords.get( 0 ).getId();
    }

    private void deletePropertyChain( long nextProp )
    {
        PropertyStore propStore = getPropertyStore();
        while ( nextProp != Record.NO_NEXT_PROPERTY.intValue() )
        {
            PropertyRecord propRecord = propStore.getRecord( nextProp );
            /*
             *  The only reason to loop over the blocks is to handle the dynamic
             *  records that possibly hang under them. Otherwise, we could just
             *  set the property record not in use and be done with it. The
             *  residue of the convenience is that we do not remove individual
             *  property blocks - we just mark the whole record as !inUse.
             */
            for ( PropertyBlock propBlock : propRecord.getPropertyBlocks() )
            {
                if ( propBlock.isLight() )
                {
                    propStore.makeHeavy( propBlock );
                }
                for ( DynamicRecord rec : propBlock.getValueRecords() )
                {
                    rec.setInUse( false );
                    propRecord.addDeletedRecord( rec );
                }
            }
            propRecord.setInUse( false );
            nextProp = propRecord.getNextProp();
            propStore.updateRecord( propRecord );
        }
    }
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore

        }
    }

    private Map<String, Object> getPropertyChain( long nextProp )
    {
        PropertyStore propStore = getPropertyStore();
        Map<String, Object> properties = new HashMap<String, Object>();

        while ( nextProp != Record.NO_NEXT_PROPERTY.intValue() )
        {
            PropertyRecord propRecord = propStore.getRecord( nextProp );
            for ( PropertyBlock propBlock : propRecord.getPropertyBlocks() )
            {
                String key = indexHolder.getStringKey( propBlock.getKeyIndexId() );
                PropertyData propertyData = propBlock.newPropertyData( propRecord );
                Object value = propertyData.getValue() != null ? propertyData.getValue() :
View Full Code Here
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.