com.sap.cloud.sdk.service.csn2jpa.cds.model.CdsEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of csn-reader Show documentation
Show all versions of csn-reader Show documentation
API for reading CDS models in CSN format
/*******************************************************************************
* * © 2018 SAP SE or an SAP affiliate company. All rights reserved. *
******************************************************************************/
package com.sap.cloud.sdk.service.csn2jpa.cds.model;
public class CdsEntity extends CdsDefinition {
private boolean isAbstract = false;
private CdsStructuredType type;
public CdsEntity() {
}
public CdsEntity(CdsContext context, String name) {
super(context, name);
}
public boolean isAbstract() {
return isAbstract;
}
public void setAbstract(boolean isAbstract) {
this.isAbstract = isAbstract;
}
public CdsStructuredType getType() {
return type;
}
public void setType(CdsStructuredType type) {
this.type = type;
}
public boolean hasElementWithName(String name) {
return type.getElements().stream().anyMatch(e -> name.equals(e.getName()));
}
@Override
public void accept(CdsVisitor visitor) {
type.accept(visitor);
visitor.visit(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy