org.apache.polygene.api.identity.Identity.toString()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中org.apache.polygene.api.identity.Identity.toString()方法的一些代码示例,展示了Identity.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Identity.toString()方法的具体详情如下:
包路径:org.apache.polygene.api.identity.Identity
类名称:Identity
方法名:toString

Identity.toString介绍

暂无

代码示例

代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.api

@Override
  public String toString()
  {
    return identity.toString();
  }
}

代码示例来源:origin: apache/attic-polygene-java

public void setIdentity( Identity identity )
{
  if( identity == null )
  {
    return;
  }
  this.identity = identity.toString();
}

代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.api

public void setIdentity( Identity identity )
{
  if( identity == null )
  {
    return;
  }
  this.identity = identity.toString();
}

代码示例来源:origin: apache/attic-polygene-java

private void removeEntity( EntityState state, PreparedStatement ps )
  throws SQLException
{
  ps.setString( 1, state.entityReference().identity().toString() );
  ps.addBatch();
}

代码示例来源:origin: apache/attic-polygene-java

private File diskStorePath()
{
  String stringIdentity = identity.identity().get().toString();
  if( fileConfiguration != null )
  {
    return new File( fileConfiguration.cacheDirectory(), stringIdentity );
  }
  return new File( System.getProperty( "java.io.tmpdir" ), stringIdentity );
}

代码示例来源:origin: apache/attic-polygene-java

@Override
public Reader get( EntityReference entityReference )
  throws EntityStoreException
{
  byte[] state = db.get( entityReference.identity().toString().getBytes( charset ) );
  if( state == null )
  {
    throw new EntityNotFoundException( entityReference );
  }
  String jsonState = new String( state, charset );
  return new StringReader( jsonState );
}

代码示例来源:origin: apache/attic-polygene-java

private Bson byIdentity( EntityReference entityReference )
  {
    return eq( IDENTITY_COLUMN, entityReference.identity().toString() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

private String cacheManagerThreadPoolName( String name )
  {
    return identity.identity().get().toString() + "-" + name;
  }
}

代码示例来源:origin: apache/attic-polygene-java

@Override
  public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
    throws EntityNotFoundException
  {
    stringMap.remove( ref.identity().toString() );
  }
} );

代码示例来源:origin: org.apache.polygene.core/org.apache.polygene.core.spi

@Override
public boolean contains( EntityReference entityReference )
{
  return indexOfReference( entityReference.identity().toString() ) != -1;
}

代码示例来源:origin: apache/attic-polygene-java

public boolean isActive()
{
  Class<?> mainType = serviceDescriptor.types().findFirst().orElse( null );
  ServiceReference<?> first = module.findServices( mainType )
                   .filter( withId( serviceDescriptor.identity().toString() ) )
                   .findFirst().orElse( null );
  return first != null && first.isActive();
}

代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.jmx

public boolean isAvailable()
{
  Class<?> mainType = serviceDescriptor.types().findFirst().orElse( null );
  ServiceReference<?> first = module.findServices( mainType )
                   .filter( withId( serviceDescriptor.identity().toString() ) )
                   .findFirst().orElse( null );
  return first != null && first.isAvailable();
}

代码示例来源:origin: apache/attic-polygene-java

@Override
  public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
    throws EntityNotFoundException
  {
    if( !blobStore.blobExists( container, ref.identity().toString() ) )
    {
      throw new EntityNotFoundException( ref );
    }
    blobStore.removeBlob( container, ref.identity().toString() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

@SuppressWarnings( "SameParameterValue" )
protected void addEntityInfoToInsertToEntityTablePS( EntityState state, PreparedStatement ps, int startingIndex )
  throws SQLException
{
  ps.setString( startingIndex, state.entityReference().identity().toString() );
  ps.setTimestamp( startingIndex + 1, Timestamp.from( state.lastModified() ) );
  ps.setString( startingIndex + 2, state.version() );
  ps.setString( startingIndex + 3, this._app.version() );
}

代码示例来源:origin: apache/attic-polygene-java

@Override
  public void removeEntity( EntityReference ref, EntityDescriptor entityDescriptor )
  {
    operations.add(
      dsl.deleteFrom( table )
        .where( identityColumn.equal( ref.identity().toString() ) )
    );
  }
} );

代码示例来源:origin: apache/attic-polygene-java

@Override
public boolean remove( EntityReference entityReference )
{
  int refIndex = indexOfReference( entityReference.identity().toString() );
  if( refIndex != -1 )
  {
    entityState.stateCloneRemoveManyAssociation( stateName, entityReference );
    entityState.markUpdated();
    return true;
  }
  return false;
}

代码示例来源:origin: apache/attic-polygene-java

@Override
public Reader get( EntityReference entityReference )
{
  String state = dsl.select( stateColumn )
           .from( table )
           .where( identityColumn.equal( entityReference.identity().toString() ) )
           .fetchOptional( stateColumn )
           .orElseThrow( () -> new EntityNotFoundException( entityReference ) );
  return new StringReader( state );
}

代码示例来源:origin: apache/attic-polygene-java

@Override
public EntityState entityStateOf( EntityStoreUnitOfWork unitOfWork, ModuleDescriptor module, EntityReference reference )
{
  return queryFor( cluster.entityRetrieveStatement().bind( reference.identity().toString() ), module, reference );
}

代码示例来源:origin: apache/attic-polygene-java

@Override
  public File locateAttachedFile()
  {
    File baseDir = spi.entityDescriptorFor( meAsIdentity ).metaInfo( File.class );
    return new File( baseDir, meAsIdentity.identity().get().toString() );
  }
}

代码示例来源:origin: apache/attic-polygene-java

private SomeType createEntity( UnitOfWork uow, Identity identity )
{
  EntityBuilder<SomeType> builder = uow.newEntityBuilder( SomeType.class, identity );
  builder.instance().name().set( identity.toString() );
  return builder.newInstance();
}

相关文章