use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kylo by Teradata.
the class FeedLineage method serialize.
@JsonIgnore
private void serialize(Feed feed) {
if (feed.getDependentFeeds() != null) {
Set<String> ids = new HashSet<>();
Set<Feed> dependentFeeds = new HashSet<>(feed.getDependentFeeds());
feed.setDependentFeeds(null);
dependentFeeds.stream().forEach(depFeed -> {
feedMap.put(depFeed.getId(), depFeed);
ids.add(depFeed.getId());
if (depFeed.getDependentFeeds() != null) {
serialize(depFeed);
}
});
feed.setDependentFeedIds(ids);
}
if (feed.getUsedByFeeds() != null) {
Set<String> ids = new HashSet<>();
Set<Feed> usedByFeeds = new HashSet<>(feed.getUsedByFeeds());
feed.getUsedByFeeds().clear();
usedByFeeds.stream().forEach(depFeed -> {
feedMap.put(depFeed.getId(), depFeed);
ids.add(depFeed.getId());
if (depFeed.getUsedByFeeds() != null) {
serialize(depFeed);
}
});
feed.setUsedByFeedIds(ids);
}
if (feed.getSources() != null) {
feed.getSources().forEach(feedSource -> {
Datasource ds = serializeDatasource(feedSource.getDatasource());
feedSource.setDatasource(null);
if (StringUtils.isBlank(feedSource.getDatasourceId())) {
feedSource.setDatasourceId(ds != null ? ds.getId() : null);
}
});
}
if (feed.getDestinations() != null) {
feed.getDestinations().forEach(feedDestination -> {
Datasource ds = serializeDatasource(feedDestination.getDatasource());
feedDestination.setDatasource(null);
if (StringUtils.isBlank(feedDestination.getDatasourceId())) {
feedDestination.setDatasourceId(ds != null ? ds.getId() : null);
}
});
}
feedMap.put(feed.getId(), feed);
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kylo by Teradata.
the class TableSetup method updateFieldStringData.
@JsonIgnore
public void updateFieldStringData() {
StringBuffer fieldsString = new StringBuffer();
StringBuffer nullableFieldsString = new StringBuffer();
StringBuffer primaryKeyFieldsString = new StringBuffer();
if (tableSchema != null && tableSchema.getFields() != null) {
for (Field field : tableSchema.getFields()) {
setStringBuffer(fieldsString, field.getName(), "\n");
if (field.isNullable()) {
setStringBuffer(nullableFieldsString, field.getName(), ",");
}
if (field.isPrimaryKey()) {
setStringBuffer(primaryKeyFieldsString, field.getName(), ",");
}
}
}
setFieldsString(fieldsString.toString());
setNullableFields(nullableFieldsString.toString());
setPrimaryKeyFields(primaryKeyFieldsString.toString());
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kylo by Teradata.
the class TableSetup method updateFieldIndexString.
@JsonIgnore
public void updateFieldIndexString() {
StringBuffer sb = new StringBuffer();
if (tableSchema != null && tableSchema.getFields() != null && fieldPolicies != null) {
int idx = 0;
for (FieldPolicy field : fieldPolicies) {
if (field.isIndex() && StringUtils.isNotBlank(sb.toString())) {
sb.append(",");
}
if (field.isIndex()) {
sb.append(tableSchema.getFields().get(idx).getName());
}
idx++;
}
}
fieldIndexString = sb.toString();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project topcom-cloud by 545314690.
the class Group method getRoleNames.
@JsonIgnore
public Set<String> getRoleNames() {
Set<String> roleNames = new HashSet();
Set<Role> roles = this.getRoles();
if (roles != null) {
Iterator var3 = roles.iterator();
while (var3.hasNext()) {
Role role = (Role) var3.next();
roleNames.add(role.getName());
}
}
return roleNames;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project topcom-cloud by 545314690.
the class Role method getPermissions.
@JsonIgnore
public Set<String> getPermissions() {
Set<String> permissions = new HashSet();
Set<Resource> resources = this.getResources();
if (resources != null) {
Iterator var3 = resources.iterator();
while (var3.hasNext()) {
Resource resource = (Resource) var3.next();
permissions.add(resource.getPermission());
}
}
return permissions;
}
Aggregations