public String getBoundName() { if (pattern != null) { return pattern.getBoundName(); } else { return binding; } } }
public String getBoundName() { if (pattern != null) { return pattern.getBoundName(); } else { return binding; } } }
@Override public String getBoundName() { return pattern.getBoundName(); }
public boolean isPatternValid(Pattern52 p) { return !(p.getBoundName() == null || p.getBoundName().equals("")); }
public boolean isPatternValid(Pattern52 p) { return !(p.getBoundName() == null || p.getBoundName().equals("")); }
private String getPatternHeader(final BaseColumn column) { final Pattern52 pattern = model.getPattern((ConditionCol52) column); final StringBuilder sb = new StringBuilder(); if (pattern.isNegated()) { sb.append("not "); } else if (!(pattern.getBoundName() == null || pattern.getBoundName().isEmpty())) { sb.append(pattern.getBoundName()).append(" : "); } sb.append(pattern.getFactType()); return sb.toString(); }
private String getPatternHeader(final BaseColumn column) { final Pattern52 pattern = model.getPattern((ConditionCol52) column); final StringBuilder sb = new StringBuilder(); if (pattern.isNegated()) { sb.append("not "); } else if (!(pattern.getBoundName() == null || pattern.getBoundName().isEmpty())) { sb.append(pattern.getBoundName()).append(" : "); } sb.append(pattern.getFactType()); return sb.toString(); }
private String getGroupIdentifier( final BaseColumn column ) { if ( column instanceof ConditionCol52 ) { final Pattern52 parentColumn = model.getPattern( (ConditionCol52) column ); return Pattern52.class.getName() + ":" + parentColumn.getBoundName(); } else if ( column instanceof ActionCol52 ) { return ActionCol52.class.getName(); } return LimitedEntryCol.class.getName() + ":" + model.getExpandedColumns().indexOf( column ); }
private String getGroupIdentifier( final BaseColumn column ) { if ( column instanceof ConditionCol52 ) { final Pattern52 parentColumn = model.getPattern( (ConditionCol52) column ); return Pattern52.class.getName() + ":" + parentColumn.getBoundName(); } else if ( column instanceof ActionCol52 ) { return ActionCol52.class.getName(); } return LimitedEntryCol.class.getName() + ":" + model.getExpandedColumns().indexOf( column ); }
private boolean isPotentialPatternDeletionSafe(final Pattern52 pattern) { if (pattern.getChildColumns().size() == 1) { final String binding = pattern.getBoundName(); if (!(binding == null || binding.isEmpty())) { return !rm.isBoundFactUsed(binding); } } return true; } }
private boolean isPotentialPatternDeletionSafe(final Pattern52 pattern) { if (pattern.getChildColumns().size() == 1) { final String binding = pattern.getBoundName(); if (!(binding == null || binding.isEmpty())) { return !rm.isBoundFactUsed(binding); } } return true; } }
@Test public void testColumnManagementGroupTitlePattern() throws Exception { final Pattern52 column = mock(Pattern52.class); doReturn(FACT_TYPE_APPLICANT).when(column).getFactType(); doReturn(APPLICANT_BOUND_NAME).when(column).getBoundName(); assertEquals(FACT_TYPE_APPLICANT + " [" + APPLICANT_BOUND_NAME + "]", DecisionTableColumnViewUtils.getColumnManagementGroupTitle(column)); }
protected Pattern52 findPattern(String boundName, String factType) { for (Pattern52 pattern : patterns) { if (pattern.getBoundName().equals(boundName) && pattern.getFactType().equals(factType)) { return pattern; } } Pattern52 pattern = new Pattern52(); pattern.setBoundName(boundName); pattern.setFactType(factType); patterns.add(pattern); return pattern; }
protected Pattern52 findPattern(String boundName, String factType) { for (Pattern52 pattern : patterns) { if (pattern.getBoundName().equals(boundName) && pattern.getFactType().equals(factType)) { return pattern; } } Pattern52 pattern = new Pattern52(); pattern.setBoundName(boundName); pattern.setFactType(factType); patterns.add(pattern); return pattern; }
void setupPatternWrapper() { patternWrapper = new PatternWrapper(getEditingPattern().getFactType(), getEditingPattern().getBoundName(), getEditingPattern().getEntryPointName(), getEditingPattern().isNegated()); }
void setupPatternWrapper() { patternWrapper = new PatternWrapper(getEditingPattern().getFactType(), getEditingPattern().getBoundName(), getEditingPattern().getEntryPointName(), getEditingPattern().isNegated()); }
/** * Clones this pattern instance. * @return The cloned instance. */ public Pattern52 clonePattern() { Pattern52 cloned = new Pattern52(); cloned.setBoundName( getBoundName() ); cloned.setChildColumns( new ArrayList<ConditionCol52>( getChildColumns() ) ); cloned.setEntryPointName( getEntryPointName() ); cloned.setFactType( getFactType() ); cloned.setNegated( isNegated() ); cloned.setWindow( getWindow() ); return cloned; }
/** * Update this pattern instance properties with the given ones from other pattern instance. * @param other The pattern to obtain the properties to set. */ public void update( Pattern52 other ) { setBoundName( other.getBoundName() ); setChildColumns( other.getChildColumns() ); setEntryPointName( other.getEntryPointName() ); setFactType( other.getFactType() ); setNegated( other.isNegated() ); setWindow( other.getWindow() ); }
protected void assertThereIsAPatternFor(final String factType, final String binding) { final Pattern52 result = dtable.getConditionPattern(binding); assertNotNull(result); assertEquals(factType, result.getFactType()); assertEquals(binding, result.getBoundName()); } }
@Test public void testCloneColumn() { Pattern52 clone = column1.clonePattern(); assertEquals(column1.getFactType(), clone.getFactType()); assertEquals(column1.getBoundName(), clone.getBoundName()); assertEquals(column1.getWindow(), clone.getWindow()); assertEquals(column1.getEntryPointName(), clone.getEntryPointName()); assertEquals(column1.isNegated(), clone.isNegated()); } }