001
002package gudusoft.gsqlparser.dlineage.dataflow.model;
003
004public enum RelationshipType {
005        fdd, fddi, frd, fdr, join, call, er, crud;
006
007        public static RelationshipType of(String type) {
008                if (type == null) {
009                        return null;
010                }
011                for (RelationshipType RelationshipType : RelationshipType.values()) {
012                        if (RelationshipType.name().equalsIgnoreCase(type.trim())) {
013                                return RelationshipType;
014                        }
015                        if("direct".equalsIgnoreCase(type.trim())){
016                                return fdd;
017                        }
018                        if("indirect".equalsIgnoreCase(type.trim())){
019                                return fdr;
020                        }
021                }
022                return null;
023        }
024}