@Override public String getValue(T item) { return item.getCreatedUsername(); } }, 80);
@Override public String getValue(T item) { return item.getEndpointCount() + ""; } }, 80);
@Override public String getValue(T item) { return item.getName(); } },
/** * Create new instance of <code>Schema</code>. * * @param dto data transfer object contain data that assign on fields of new instance */ public Schema(T dto) { if (dto != null) { this.id = getLongId(dto); Long appId = getLongId(dto.getApplicationId()); this.application = appId != null ? new Application(appId) : null; this.version = dto.getVersion(); this.schema = dto.getSchema(); this.name = dto.getName(); this.description = dto.getDescription(); this.createdUsername = dto.getCreatedUsername(); this.createdTime = dto.getCreatedTime(); this.endpointCount = dto.getEndpointCount(); } }
@Override public T toDto() { T dto = createDto(); dto.setId(getStringId()); if (application != null) { dto.setApplicationId(application.getStringId()); } dto.setVersion(version); dto.setSchema(schema); dto.setName(name); dto.setDescription(description); dto.setCreatedUsername(createdUsername); dto.setCreatedTime(createdTime); dto.setEndpointCount(endpointCount); return dto; }
void convertToSchemaForm(AbstractSchemaDto dto, SchemaFormAvroConverter converter) throws IOException { Schema schema = new Schema.Parser().parse(dto.getSchema()); RecordField schemaForm = converter.createSchemaFormFromSchema(schema); dto.setSchemaForm(schemaForm); }
void convertToStringSchema(AbstractSchemaDto dto, SchemaFormAvroConverter converter) throws Exception { Schema schema = converter.createSchemaFromSchemaForm(dto.getSchemaForm()); validateRecordSchema(schema); String schemaString = SchemaFormAvroConverter.createSchemaString(schema, true); dto.setSchema(schemaString); }
@Override public String getValue(T item) { return item.getVersion() + ""; } },
@Override public String getValue(T item) { return Utils.millisecondsToDateString(item.getCreatedTime()); } }, 80);
void setSchema(AbstractSchemaDto schemaDto, byte[] data) throws KaaAdminServiceException { String schema = new String(data); validateRecordSchema(schema, false); schemaDto.setSchema(new KaaSchemaFactoryImpl().createDataSchema(schema).getRawSchema()); }
@Override public int compare(T o1, T o2) { return o1.compareTo(o2); } },
protected Integer getDownloadSchemaColumnClickedId(T value) { return value.getVersion(); } }