Java Code Examples for io.protostuff.Output#writeUInt64()

The following examples show how to use io.protostuff.Output#writeUInt64() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleField.java    From datawave with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(Output output, SimpleField message) throws IOException {
    if (message.columnVisibility != null)
        output.writeString(1, message.columnVisibility, false);
    output.writeUInt64(2, message.timestamp, false);
    if (message.name != null)
        output.writeString(3, message.name, false);
    if (message.value != null)
        output.writeObject(4, message.value, message.value.cachedSchema(), false);
    if (message.markings != null) {
        output.writeObject(5, message.markings, MAP_SCHEMA, false);
    }
}
 
Example 2
Source File: DefaultField.java    From datawave with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(Output output, DefaultField message) throws IOException {
    if (message.markings != null)
        output.writeObject(1, message.markings, MapSchema.SCHEMA, false);
    if (message.columnVisibility != null)
        output.writeString(2, message.columnVisibility, false);
    output.writeUInt64(3, message.timestamp, false);
    if (message.name != null)
        output.writeString(4, message.name, false);
    if (message.value != null)
        output.writeObject(5, message.value, message.value.cachedSchema(), false);
}
 
Example 3
Source File: DefaultFieldCardinality.java    From datawave with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(Output output, DefaultFieldCardinality message) throws IOException {
    if (message.columnVisibility != null)
        output.writeString(1, message.columnVisibility, false);
    output.writeUInt64(2, message.cardinality, false);
    output.writeString(3, message.lower, false);
    output.writeString(4, message.upper, false);
}
 
Example 4
Source File: FieldStat.java    From datawave with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(Output output, FieldStat message) throws IOException {
    output.writeString(1, message.field, false);
    output.writeUInt64(2, message.unique, false);
    output.writeUInt64(3, message.observed, false);
    output.writeDouble(4, message.selectivity, false);
}
 
Example 5
Source File: DefaultEdgeQueryResponse.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, DefaultEdgeQueryResponse message) throws IOException {
    
    if (message.getQueryId() != null) {
        output.writeString(1, message.getQueryId(), false);
    }
    
    if (message.getLogicName() != null) {
        output.writeString(2, message.getLogicName(), false);
    }
    
    output.writeUInt64(3, message.getOperationTimeMS(), false);
    
    List<String> messages = message.getMessages();
    if (messages != null) {
        for (String msg : messages) {
            if (msg != null)
                output.writeString(4, msg, true);
        }
    }
    
    List<QueryExceptionType> exceptions = message.getExceptions();
    if (exceptions != null) {
        for (QueryExceptionType exception : exceptions) {
            if (exception != null)
                output.writeObject(5, exception, QueryExceptionType.getSchema(), true);
        }
    }
    
    if (message.securityMarkings != null)
        output.writeString(6, message.securityMarkings, false);
    
    if (message.edges != null) {
        for (DefaultEdge edge : message.edges) {
            if (edge != null)
                output.writeObject(7, edge, DefaultEdge.getSchema(), true);
        }
    }
}
 
Example 6
Source File: DefaultMetadataQueryResponse.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, DefaultMetadataQueryResponse message) throws IOException {
    if (message.totalResults != null) {
        output.writeUInt64(1, message.totalResults, false);
    }
    
    if (message.fields != null) {
        for (MetadataFieldBase field : message.fields) {
            if (field != null)
                output.writeObject(2, (DefaultMetadataField) field, DefaultMetadataField.getSchema(), true);
        }
    }
}
 
Example 7
Source File: FacetQueryResponse.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, FacetQueryResponse message) throws IOException {
    
    if (message.getQueryId() != null) {
        output.writeString(1, message.getQueryId(), false);
    }
    
    if (message.getLogicName() != null) {
        output.writeString(2, message.getLogicName(), false);
    }
    
    output.writeUInt64(3, message.getOperationTimeMS(), false);
    
    List<String> messages = message.getMessages();
    if (messages != null) {
        for (String msg : messages) {
            if (msg != null)
                output.writeString(4, msg, true);
        }
    }
    
    List<QueryExceptionType> exceptions = message.getExceptions();
    if (exceptions != null) {
        for (QueryExceptionType exception : exceptions) {
            if (exception != null)
                output.writeObject(5, exception, QueryExceptionType.getSchema(), true);
        }
    }
    
    if (message.facets != null) {
        for (DefaultFacets facet : message.facets) {
            if (facet != null)
                output.writeObject(6, facet, DefaultFacets.getSchema(), true);
        }
    }
}
 
Example 8
Source File: BulkResultsInfoResponseList.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, BulkResultsInfoResponseList message) throws IOException {
    
    if (message.getQueryId() != null) {
        output.writeString(1, message.getQueryId(), false);
    }
    
    if (message.getLogicName() != null) {
        output.writeString(2, message.getLogicName(), false);
    }
    
    output.writeUInt64(3, message.getOperationTimeMS(), false);
    
    List<String> messages = message.getMessages();
    if (messages != null) {
        for (String msg : messages) {
            if (msg != null)
                output.writeString(4, msg, true);
        }
    }
    
    List<QueryExceptionType> exceptions = message.getExceptions();
    if (exceptions != null) {
        for (QueryExceptionType exception : exceptions) {
            if (exception != null)
                output.writeObject(5, exception, QueryExceptionType.getSchema(), true);
        }
    }
    
    if (message.bulkResults != null) {
        for (BulkResultsInfoResponse result : message.bulkResults) {
            if (result != null)
                output.writeObject(6, result, BulkResultsInfoResponse.getSchema(), true);
        }
    }
}
 
Example 9
Source File: BulkResultsInfoResponse.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, History message) throws IOException {
    if (message.getState() != null) {
        output.writeString(1, message.getState(), false);
    }
    
    if (message.getTimestamp() != null) {
        output.writeUInt64(2, message.getTimestamp(), false);
    }
}
 
Example 10
Source File: JobExecution.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, JobExecution message) throws IOException {
    
    if (message.getMapReduceJobId() != null) {
        output.writeString(1, message.getMapReduceJobId(), false);
    }
    
    output.writeUInt64(2, message.getTimestamp(), false);
    
    if (message.getState() != null) {
        output.writeString(3, message.getState(), false);
    }
}
 
Example 11
Source File: MapReduceInfoResponseList.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, MapReduceInfoResponseList message) throws IOException {
    
    if (message.getResults() != null) {
        for (MapReduceInfoResponse response : message.getResults()) {
            if (null != response) {
                output.writeObject(1, response, MapReduceInfoResponse.getSchema(), true);
            }
        }
    }
    
    output.writeUInt64(2, message.getOperationTimeMS(), false);
    
    List<String> messages = message.getMessages();
    if (messages != null) {
        for (String msg : messages) {
            if (msg != null)
                output.writeString(3, msg, true);
        }
    }
    
    List<QueryExceptionType> exceptions = message.getExceptions();
    if (exceptions != null) {
        for (QueryExceptionType exception : exceptions) {
            if (exception != null)
                output.writeObject(4, exception, QueryExceptionType.getSchema(), true);
        }
    }
    
}
 
Example 12
Source File: ResultFile.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, ResultFile message) throws IOException {
    
    if (message.getFileName() != null) {
        output.writeString(1, message.getFileName(), false);
    }
    
    output.writeUInt64(2, message.getLength(), false);
}
 
Example 13
Source File: FileDetails.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, FileDetails message) throws IOException {
    
    if (message.getPath() != null) {
        output.writeString(1, message.getPath(), false);
    }
    if (message.getDate() != null) {
        output.writeUInt64(2, message.getDate().getTime(), false);
    }
    output.writeUInt64(3, message.getSize(), false);
}
 
Example 14
Source File: FileResponseList.java    From datawave with Apache License 2.0 5 votes vote down vote up
public void writeTo(Output output, FileResponseList message) throws IOException {
    
    if (message.getFiles() != null) {
        for (FileDetails file : message.getFiles()) {
            if (null != file) {
                output.writeObject(1, file, FileDetails.getSchema(), true);
            }
        }
    }
    
    output.writeUInt64(2, message.getOperationTimeMS(), false);
    
    List<String> messages = message.getMessages();
    if (messages != null) {
        for (String msg : messages) {
            if (msg != null)
                output.writeString(3, msg, true);
        }
    }
    
    List<QueryExceptionType> exceptions = message.getExceptions();
    if (exceptions != null) {
        for (QueryExceptionType exception : exceptions) {
            if (exception != null)
                output.writeObject(4, exception, QueryExceptionType.getSchema(), true);
        }
    }
    
}