idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
7,000 | public void clearMessages ( String fieldName ) { Set messagesForFieldName = getMessages ( fieldName ) ; for ( Iterator mi = messagesForFieldName . iterator ( ) ; mi . hasNext ( ) ; ) { messages . remove ( mi . next ( ) ) ; } messagesSubSets . clear ( ) ; } | Clear all messages of the given fieldName . |
7,001 | protected boolean isEditable ( Object row , int column ) { beanWrapper . setWrappedInstance ( row ) ; return beanWrapper . isWritableProperty ( columnPropertyNames [ column ] ) ; } | May be overridden to achieve control over editable columns . |
7,002 | protected void fill ( GroupContainerPopulator parentContainer , Object factory , CommandButtonConfigurer configurer , List previousButtons ) { parentContainer . add ( Box . createGlue ( ) ) ; } | Adds a glue component using the given container populator . |
7,003 | public EventList getBaseEventList ( ) { if ( baseList == null ) { Object [ ] data = getInitialData ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Table data: got " + data . length + " entries" ) ; } EventList rawList = GlazedLists . eventList ( Arrays . asList ( data ) ) ; int initialSortColumn = getInitialSortColumn ( ) ; if ( initialSortColumn >= 0 ) { String sortProperty = getColumnPropertyNames ( ) [ initialSortColumn ] ; baseList = new SortedList ( rawList , new PropertyComparator ( sortProperty , false , true ) ) ; } else { baseList = new SortedList ( rawList ) ; } } return baseList ; } | Get the base event list for the table model . This can be used to build layered event models for filtering . |
7,004 | protected void init ( ) { objectSingularName = getApplicationConfig ( ) . messageResolver ( ) . getMessage ( modelId + ".objectName.singular" ) ; objectPluralName = getApplicationConfig ( ) . messageResolver ( ) . getMessage ( modelId + ".objectName.plural" ) ; } | Initialize our internal values . |
7,005 | protected void onDoubleClick ( ) { if ( doubleClickHandler != null ) { boolean okToExecute = true ; if ( doubleClickHandler instanceof GuardedActionCommandExecutor ) { okToExecute = ( ( GuardedActionCommandExecutor ) doubleClickHandler ) . isEnabled ( ) ; } if ( okToExecute ) { doubleClickHandler . execute ( ) ; } } } | Handle a double click on a row of the table . The row will already be selected . |
7,006 | protected GlazedTableModel createTableModel ( EventList eventList ) { return new GlazedTableModel ( eventList , getColumnPropertyNames ( ) , modelId ) { protected TableFormat createTableFormat ( ) { return new DefaultAdvancedTableFormat ( ) ; } } ; } | Construct the table model for this table . The default implementation of this creates a GlazedTableModel using an Advanced format . |
7,007 | protected void updateStatusBar ( ) { if ( statusBar != null ) { int all = getBaseEventList ( ) . size ( ) ; int showing = getFinalEventList ( ) . size ( ) ; String msg ; if ( all == showing ) { String [ ] keys = new String [ ] { modelId + "." + SHOWINGALL_MSG_KEY , SHOWINGALL_MSG_KEY } ; msg = getApplicationConfig ( ) . messageResolver ( ) . getMessage ( keys , new Object [ ] { "" + all , ( all != 1 ) ? objectPluralName : objectSingularName } ) ; } else { String [ ] keys = new String [ ] { modelId + "." + SHOWINGN_MSG_KEY , SHOWINGN_MSG_KEY } ; msg = getApplicationConfig ( ) . messageResolver ( ) . getMessage ( keys , new Object [ ] { "" + showing , ( showing != 1 ) ? objectPluralName : objectSingularName , "" + all } ) ; } int nselected = getTable ( ) . getSelectedRowCount ( ) ; if ( nselected > 0 ) { String [ ] keys = new String [ ] { modelId + "." + SELECTEDN_MSG_KEY , SELECTEDN_MSG_KEY } ; msg += getApplicationConfig ( ) . messageResolver ( ) . getMessage ( keys , new Object [ ] { "" + nselected } ) ; } statusBar . setMessage ( msg . toString ( ) ) ; } } | Update the status bar with the current display counts . |
7,008 | public void onApplicationEvent ( ApplicationEvent e ) { if ( e instanceof LifecycleApplicationEvent ) { LifecycleApplicationEvent le = ( LifecycleApplicationEvent ) e ; if ( shouldHandleEvent ( e ) ) { if ( le . getEventType ( ) == LifecycleApplicationEvent . CREATED ) { handleNewObject ( le . getObject ( ) ) ; } else if ( le . getEventType ( ) == LifecycleApplicationEvent . MODIFIED ) { handleUpdatedObject ( le . getObject ( ) ) ; } else if ( le . getEventType ( ) == LifecycleApplicationEvent . DELETED ) { handleDeletedObject ( le . getObject ( ) ) ; } } } } | Handle an application event . This will notify us of object adds deletes and modifications . Update our table model accordingly . |
7,009 | public static JComponent createButtonBar ( Object [ ] groupMembers ) { CommandGroupFactoryBean commandGroupFactoryBean = new CommandGroupFactoryBean ( null , groupMembers ) ; CommandGroup dialogCommandGroup = commandGroupFactoryBean . getCommandGroup ( ) ; JComponent buttonBar = dialogCommandGroup . createButtonBar ( ) ; GuiStandardUtils . attachDialogBorder ( buttonBar ) ; return buttonBar ; } | Return a standardized row of command buttons . |
7,010 | public static void adaptPageCompletetoGuarded ( DialogPage dialogPage , Guarded guarded ) { dialogPage . addPropertyChangeListener ( DialogPage . PAGE_COMPLETE_PROPERTY , new PageCompleteAdapter ( guarded ) ) ; } | Create an adapter that will monitor the page complete status of the dialog page and adapt it to operations on the provided Guarded object . If the page is complete then the guarded object will be enabled . If this page is not complete then the guarded object will be disabled . |
7,011 | public Counter build ( ) { return new Counter ( this . getName ( ) , this . getDescription ( ) , this . getNumShards ( ) , this . getCounterStatus ( ) , this . getCount ( ) , this . getIndexes ( ) , this . getCreationDateTime ( ) ) ; } | Build method for constructing a new Counter . |
7,012 | private Method getMethod ( Class visitorClass , Object argument ) { ClassVisitMethods visitMethods = ( ClassVisitMethods ) this . visitorClassVisitMethods . get ( visitorClass ) ; return visitMethods . getVisitMethod ( argument != null ? argument . getClass ( ) : null ) ; } | Determines the most appropriate visit method for the given visitor class and argument . |
7,013 | private boolean hasSameStructure ( ) { Object wrappedCollection = getWrappedValue ( ) ; if ( wrappedCollection == null ) { return bufferedListModel . size ( ) == 0 ; } else if ( wrappedCollection instanceof Object [ ] ) { Object [ ] wrappedArray = ( Object [ ] ) wrappedCollection ; if ( wrappedArray . length != bufferedListModel . size ( ) ) { return false ; } for ( int i = 0 ; i < bufferedListModel . size ( ) ; i ++ ) { if ( super . hasValueChanged ( wrappedArray [ i ] , bufferedListModel . get ( i ) ) ) { return false ; } } } else { if ( ( ( Collection ) wrappedCollection ) . size ( ) != bufferedListModel . size ( ) ) { return false ; } for ( Iterator i = ( ( Collection ) wrappedCollection ) . iterator ( ) , j = bufferedListModel . iterator ( ) ; i . hasNext ( ) ; ) { if ( super . hasValueChanged ( i . next ( ) , j . next ( ) ) ) { return false ; } } } return true ; } | Checks if the structure of the buffered list model is the same as the wrapped collection . same structure is defined as having the same elements in the same order with the one exception that NULL == empty list . |
7,014 | private Object updateBufferedListModel ( final Object wrappedCollection ) { if ( bufferedListModel == null ) { bufferedListModel = createBufferedListModel ( ) ; bufferedListModel . addListDataListener ( listChangeHandler ) ; setValue ( bufferedListModel ) ; } if ( wrappedCollection == null ) { bufferedListModel . clear ( ) ; } else { if ( wrappedType . isAssignableFrom ( wrappedCollection . getClass ( ) ) ) { Collection buffer = null ; if ( wrappedCollection instanceof Object [ ] ) { Object [ ] wrappedArray = ( Object [ ] ) wrappedCollection ; buffer = Arrays . asList ( wrappedArray ) ; } else { buffer = ( Collection ) wrappedCollection ; } bufferedListModel . clear ( ) ; bufferedListModel . addAll ( prepareBackingCollection ( buffer ) ) ; } else { throw new IllegalArgumentException ( "wrappedCollection must be assignable from " + wrappedType . getName ( ) ) ; } } return bufferedListModel ; } | Gets the list value associated with this value model creating a list model buffer containing its contents suitable for manipulation . |
7,015 | private ApplicationContext loadStartupContext ( Class < ? extends SplashScreenConfig > startupConfig ) { if ( startupConfig == null ) return null ; logger . info ( "Loading startup context from class (" + startupConfig . getName ( ) + ")" ) ; return new AnnotationConfigApplicationContext ( startupConfig ) ; } | Returns an application context loaded from the bean definition file at the given classpath - relative location . |
7,016 | public void keyReleased ( KeyEvent e ) { char ch = e . getKeyChar ( ) ; if ( ch == KeyEvent . CHAR_UNDEFINED || Character . isISOControl ( ch ) ) return ; int pos = editor . getCaretPosition ( ) ; String str = editor . getText ( ) ; if ( str . length ( ) == 0 ) return ; boolean matchFound = false ; for ( int k = 0 ; k < comboBox . getItemCount ( ) ; k ++ ) { String item = comboBox . getItemAt ( k ) . toString ( ) ; if ( startsWithIgnoreCase ( item , str ) ) { comboBox . setSelectedIndex ( k ) ; editor . setText ( item ) ; editor . setCaretPosition ( item . length ( ) ) ; editor . moveCaretPosition ( pos ) ; if ( comboBox . isDisplayable ( ) ) comboBox . setPopupVisible ( true ) ; matchFound = true ; break ; } } if ( ! matchFound ) { comboBox . setPopupVisible ( false ) ; } } | Handle a key release event . See if what they ve type so far matches anything in the selectable items list . If so then show the popup and select the item . If not then hide the popup . |
7,017 | private boolean startsWithIgnoreCase ( String str1 , String str2 ) { return str1 != null && str2 != null && str1 . toUpperCase ( ) . startsWith ( str2 . toUpperCase ( ) ) ; } | See if one string begins with another ignoring case . |
7,018 | private void highlightText ( int start ) { editor . setCaretPosition ( editor . getText ( ) . length ( ) ) ; editor . moveCaretPosition ( start ) ; } | Highlight the text from the given start location to the end of the text . |
7,019 | protected boolean shouldEnable ( int [ ] selected ) { return selected != null && selected . length >= 1 && ( requiredCount == - 1 || requiredCount == selected . length ) ; } | Determine if the guarded object should be enabled based on the contents of the current selection model value . |
7,020 | private static Method getNamedPCLAdder ( Class beanClass ) { try { return beanClass . getMethod ( "addPropertyChangeListener" , NAMED_PCL_PARAMS ) ; } catch ( NoSuchMethodException e ) { return null ; } } | Looks up and returns the method that adds a PropertyChangeListener for a specified property name to instances of the given class . |
7,021 | public static JComponent createCommandButtonColumn ( JButton [ ] buttons ) { ButtonStackBuilder builder = new ButtonStackBuilder ( ) ; for ( int i = 0 ; i < buttons . length ; i ++ ) { if ( i > 0 ) { builder . addRelatedGap ( ) ; } builder . addGridded ( buttons [ i ] ) ; } return builder . getPanel ( ) ; } | Make a vertical row of buttons of equal size whch are equally spaced and aligned on the right . |
7,022 | public static JTextArea createStandardTextArea ( String text ) { JTextArea result = new JTextArea ( text ) ; return configureStandardTextArea ( result ) ; } | An alternative to multi - line labels for the presentation of several lines of text and for which the line breaks are determined solely by the control . |
7,023 | public static void truncateLabelIfLong ( JLabel label ) { String originalText = label . getText ( ) ; if ( originalText . length ( ) > UIConstants . MAX_LABEL_LENGTH ) { label . setToolTipText ( originalText ) ; String truncatedText = originalText . substring ( 0 , UIConstants . MAX_LABEL_LENGTH ) + "..." ; label . setText ( truncatedText ) ; } } | If aLabel has text which is longer than MAX_LABEL_LENGTH then truncate the label text and place an ellipsis at the end ; the original text is placed in a tooltip . |
7,024 | public static void createDebugBorder ( JComponent c , Color color ) { if ( color == null ) { color = Color . BLACK ; } c . setBorder ( BorderFactory . createLineBorder ( color ) ) ; } | Useful debug function to place a colored line border around a component for layout management debugging . |
7,025 | public GridBagLayoutBuilder append ( Component component , int colSpan , int rowSpan ) { return append ( component , colSpan , rowSpan , 0.0 , 0.0 ) ; } | Appends the given component to the end of the current line using the default insets and no expansion |
7,026 | public GridBagLayoutBuilder appendLabel ( JLabel label , int colSpan ) { return append ( label , colSpan , 1 , false , false ) ; } | Appends the given label to the end of the current line . The label does not grow . |
7,027 | public GridBagLayoutBuilder appendField ( Component component , int colSpan ) { return append ( component , colSpan , 1 , true , false ) ; } | Appends the given component to the end of the current line . The component will grow horizontally as space allows . |
7,028 | public void fire ( String methodName , Object arg ) { if ( listeners != EMPTY_OBJECT_ARRAY ) { fireEventByReflection ( methodName , new Object [ ] { arg } ) ; } } | Invokes the method with the given name and a single parameter on each of the listeners registered with this list . |
7,029 | public void fire ( String methodName , Object arg1 , Object arg2 ) { if ( listeners != EMPTY_OBJECT_ARRAY ) { fireEventByReflection ( methodName , new Object [ ] { arg1 , arg2 } ) ; } } | Invokes the method with the given name and two parameters on each of the listeners registered with this list . |
7,030 | public void fire ( String methodName , Object [ ] args ) { if ( listeners != EMPTY_OBJECT_ARRAY ) { fireEventByReflection ( methodName , args ) ; } } | Invokes the method with the given name and number of formal parameters on each of the listeners registered with this list . |
7,031 | public boolean addAll ( Object [ ] listenersToAdd ) { if ( listenersToAdd == null ) { return false ; } boolean changed = false ; for ( int i = 0 ; i < listenersToAdd . length ; i ++ ) { if ( add ( listenersToAdd [ i ] ) ) { changed = true ; } } return changed ; } | Adds all the given listeners to the list of registered listeners . If any of the elements in the array are null or are listeners that are already registered they will not be registered again . |
7,032 | private void fireEventByReflection ( String methodName , Object [ ] eventArgs ) { Method eventMethod = ( Method ) methodCache . get ( new MethodCacheKey ( listenerClass , methodName , eventArgs . length ) ) ; Object [ ] listenersCopy = listeners ; for ( int i = 0 ; i < listenersCopy . length ; i ++ ) { try { eventMethod . invoke ( listenersCopy [ i ] , eventArgs ) ; } catch ( InvocationTargetException e ) { throw new EventBroadcastException ( "Exception thrown by listener" , e . getCause ( ) ) ; } catch ( IllegalAccessException e ) { throw new EventBroadcastException ( "Unable to invoke listener" , e ) ; } } } | Invokes the method with the given name on each of the listeners registered with this list helper . The given arguments are passed to each method invocation . |
7,033 | public Object toArray ( ) { if ( listeners == EMPTY_OBJECT_ARRAY ) return Array . newInstance ( listenerClass , 0 ) ; Object [ ] listenersCopy = listeners ; Object copy = Array . newInstance ( listenerClass , listenersCopy . length ) ; System . arraycopy ( listenersCopy , 0 , copy , 0 , listenersCopy . length ) ; return copy ; } | Returns an object which is a copy of the collection of listeners registered with this instance . |
7,034 | protected void reset ( ) { if ( this . status == ProcessStatus . STOPPED || this . status == ProcessStatus . COMPLETED ) { if ( this . runOnce ) { throw new UnsupportedOperationException ( "This process template can only safely execute once; " + "instantiate a new instance per request" ) ; } this . status = ProcessStatus . RESET ; } } | Reset the ElementGenerator if possible . |
7,035 | public void buildInitialLayout ( PageLayoutBuilder pageLayout ) { for ( Iterator iter = _viewDescriptors . iterator ( ) ; iter . hasNext ( ) ; ) { String viewDescriptorId = ( String ) iter . next ( ) ; pageLayout . addView ( viewDescriptorId ) ; } } | Builds the initial page layout by iterating the collection of view descriptors . |
7,036 | public void commit ( ) { for ( Iterator i = listeners . iterator ( ) ; i . hasNext ( ) ; ) { ( ( CommitTriggerListener ) i . next ( ) ) . commit ( ) ; } } | Triggers a commit event . |
7,037 | public void revert ( ) { for ( Iterator i = listeners . iterator ( ) ; i . hasNext ( ) ; ) { ( ( CommitTriggerListener ) i . next ( ) ) . revert ( ) ; } } | Triggers a revert event . |
7,038 | private void internalSetParent ( CommandRegistry parentRegistry ) { if ( ! ObjectUtils . nullSafeEquals ( this . parent , parentRegistry ) ) { if ( this . parent != null ) { this . parent . removeCommandRegistryListener ( this ) ; } this . parent = parentRegistry ; if ( this . parent != null ) { this . parent . addCommandRegistryListener ( this ) ; } } } | This method is provided as a private helper so that it can be called by the constructor instead of the constructor having to call the public overridable setParent method . |
7,039 | public void setImage ( Resource resource ) { ImageIcon image = null ; if ( resource != null && resource . exists ( ) ) { try { image = new ImageIcon ( resource . getURL ( ) ) ; } catch ( IOException e ) { logger . warn ( "Error reading resource: " + resource ) ; throw new RuntimeException ( "Error reading resource " + resource , e ) ; } } setImage ( image ) ; } | Sets the image content of the widget based on a resource |
7,040 | public void setAntiAlias ( boolean antiAlias ) { if ( this . antiAlias == antiAlias ) { return ; } this . antiAlias = antiAlias ; firePropertyChange ( "antiAlias" , ! antiAlias , antiAlias ) ; repaint ( ) ; } | Set whether the pane should render the HTML using anti - aliasing . |
7,041 | public void setAllowSelection ( boolean allowSelection ) { if ( this . allowSelection == allowSelection ) { return ; } this . allowSelection = allowSelection ; setCaretInternal ( ) ; firePropertyChange ( "allowSelection" , ! allowSelection , allowSelection ) ; } | Set whether or not selection should be allowed in this pane . |
7,042 | protected void installLaFStyleSheet ( ) { Font defaultFont = UIManager . getFont ( "Button.font" ) ; String stylesheet = "body { font-family: " + defaultFont . getName ( ) + "; font-size: " + defaultFont . getSize ( ) + "pt; }" + "a, p, li { font-family: " + defaultFont . getName ( ) + "; font-size: " + defaultFont . getSize ( ) + "pt; }" ; try { ( ( HTMLDocument ) getDocument ( ) ) . getStyleSheet ( ) . loadRules ( new StringReader ( stylesheet ) , null ) ; } catch ( IOException e ) { } } | Applies the current LaF font setting to the document . |
7,043 | public void add ( ApplicationWindow window ) { if ( activeWindow == null ) setActiveWindow ( window ) ; if ( ! windows . contains ( window ) ) { windows . add ( window ) ; window . setWindowManager ( this ) ; setChanged ( ) ; notifyObservers ( ) ; } } | Adds the given window to the set of windows managed by this window manager . Does nothing is this window is already managed by this window manager . |
7,044 | private void addWindowManager ( WindowManager wm ) { if ( subManagers == null ) { subManagers = new ArrayList ( ) ; } if ( ! subManagers . contains ( wm ) ) { subManagers . add ( wm ) ; wm . parentManager = this ; } } | Adds the given window manager to the list of window managers that have this one as a parent . |
7,045 | public boolean close ( ) { List t = ( List ) ( ( ArrayList ) windows ) . clone ( ) ; Iterator e = t . iterator ( ) ; while ( e . hasNext ( ) ) { ApplicationWindow window = ( ApplicationWindow ) e . next ( ) ; if ( ! window . close ( ) ) { return false ; } } if ( subManagers != null ) { e = subManagers . iterator ( ) ; while ( e . hasNext ( ) ) { WindowManager wm = ( WindowManager ) e . next ( ) ; if ( ! wm . close ( ) ) { return false ; } } } return true ; } | Attempts to close all windows managed by this window manager as well as windows managed by any descendent window managers . |
7,046 | public ApplicationWindow [ ] getWindows ( ) { ApplicationWindow managed [ ] = new ApplicationWindow [ windows . size ( ) ] ; windows . toArray ( managed ) ; return managed ; } | Returns this window manager s set of windows . |
7,047 | public final void remove ( ApplicationWindow window ) { if ( windows . contains ( window ) ) { windows . remove ( window ) ; window . setWindowManager ( null ) ; setChanged ( ) ; notifyObservers ( ) ; } } | Removes the given window from the set of windows managed by this window manager . Does nothing is this window is not managed by this window manager . |
7,048 | public final void setActiveWindow ( ApplicationWindow window ) { final ApplicationWindow old = this . activeWindow ; this . activeWindow = window ; if ( getParent ( ) != null ) getParent ( ) . setActiveWindow ( window ) ; getChangeSupport ( ) . firePropertyChange ( "activeWindow" , old , window ) ; } | Set the currently active window . When a window gets focus it will set itself as the current window of it s manager . |
7,049 | public void onPreWindowOpen ( ApplicationWindowConfigurer configurer ) { configurer . setTitle ( application . getName ( ) ) ; configurer . setImage ( application . getImage ( ) ) ; } | Hook called right before the application opens a window . |
7,050 | public Object set ( int index , Object element ) { Object oldObject = items . set ( index , element ) ; if ( hasChanged ( oldObject , element ) ) { fireContentsChanged ( index ) ; } return oldObject ; } | Set the value of a list element at the specified index . |
7,051 | public boolean replaceWith ( Collection collection ) { boolean changed = false ; if ( items . size ( ) > 0 ) { items . clear ( ) ; changed = true ; } if ( items . addAll ( 0 , collection ) && ! changed ) { changed = true ; } if ( changed ) { fireContentsChanged ( - 1 , - 1 ) ; } return changed ; } | Replace this list model s items with the contents of the provided collection . |
7,052 | public static TableFormat makeTableFormat ( final TableDescription desc ) { return new AdvancedWritableTableFormat ( ) { public Class getColumnClass ( int i ) { return desc . getType ( i ) ; } public Comparator getColumnComparator ( int i ) { Comparator comp = desc . getColumnComparator ( i ) ; if ( comp != null ) return comp ; Class type = getColumnClass ( i ) ; if ( Boolean . class . isAssignableFrom ( type ) || Boolean . TYPE . isAssignableFrom ( type ) ) return GlazedLists . booleanComparator ( ) ; else if ( String . class . isAssignableFrom ( type ) ) return getLowerCaseStringComparator ( ) ; else if ( Comparable . class . isAssignableFrom ( type ) ) return GlazedLists . comparableComparator ( ) ; else return null ; } public int getColumnCount ( ) { return desc . getColumnCount ( ) ; } public String getColumnName ( int i ) { return desc . getHeader ( i ) ; } public Object getColumnValue ( Object obj , int i ) { return desc . getValue ( obj , i ) ; } public boolean isEditable ( Object baseObject , int column ) { return desc . getColumnEditor ( column ) != null ; } public Object setColumnValue ( Object baseObject , Object editedValue , int column ) { desc . setValue ( baseObject , column , editedValue ) ; return baseObject ; } } ; } | Conversion of RCP TableDescription to GlazedLists TableFormat |
7,053 | protected Set < ConstraintViolation < T > > doValidate ( final T object , final String property ) { if ( property == null ) { final Set < ConstraintViolation < T > > ret = Sets . newHashSet ( ) ; PropertyDescriptor [ ] propertyDescriptors ; try { propertyDescriptors = Introspector . getBeanInfo ( object . getClass ( ) ) . getPropertyDescriptors ( ) ; } catch ( IntrospectionException e ) { throw new IllegalStateException ( "Could not retrieve property information" ) ; } for ( final PropertyDescriptor prop : propertyDescriptors ) { String propertyName = prop . getName ( ) ; if ( formModel . hasValueModel ( propertyName ) && ! ignoredProperties . contains ( propertyName ) ) { final Set < ConstraintViolation < T > > result = validator . validateValue ( beanClass , propertyName , formModel . getValueModel ( propertyName ) . getValue ( ) ) ; if ( result != null ) { ret . addAll ( result ) ; } } } return ret ; } else if ( ! ignoredProperties . contains ( property ) && formModel . hasValueModel ( property ) ) { return validator . validateValue ( beanClass , property , formModel . getValueModel ( property ) . getValue ( ) ) ; } else { return null ; } } | Validates the object through Hibernate Validator |
7,054 | public static Field [ ] getAllDeclaredFields ( Class < ? > leafClass ) { Assert . notNull ( leafClass , "leafClass" ) ; final List < Field > fields = new ArrayList < Field > ( 32 ) ; ReflectionUtils . doWithFields ( leafClass , new ReflectionUtils . FieldCallback ( ) { public void doWith ( Field field ) throws IllegalArgumentException , IllegalAccessException { fields . add ( field ) ; } } ) ; return fields . toArray ( new Field [ fields . size ( ) ] ) ; } | Get all declared fields on the leaf class and all superclasses . Leaf class methods are included first . |
7,055 | public static Object unwrapProxy ( Object bean , Boolean recursive ) { Assert . notNull ( recursive , "recursive" ) ; Object unwrapped = bean ; if ( ( bean != null ) && ( bean instanceof Advised ) && ( AopUtils . isAopProxy ( bean ) ) ) { final Advised advised = ( Advised ) bean ; try { final Object target = advised . getTargetSource ( ) . getTarget ( ) ; unwrapped = recursive ? ObjectUtils . unwrapProxy ( target , recursive ) : target ; } catch ( Exception e ) { unwrapped = bean ; ObjectUtils . LOGGER . warn ( "Failure unwrapping \"" + bean + "\"." , e ) ; } } return unwrapped ; } | This is a utility method for getting raw objects that may have been proxied . It is intended to be used in cases where raw implementations are needed rather than working with interfaces which they implement . |
7,056 | public static void mapObjectOnFormModel ( FormModel formModel , Object objectToMap ) { BeanWrapper beanWrapper = new BeanWrapperImpl ( objectToMap ) ; for ( String fieldName : ( Set < String > ) formModel . getFieldNames ( ) ) { try { formModel . getValueModel ( fieldName ) . setValue ( beanWrapper . getPropertyValue ( fieldName ) ) ; } catch ( BeansException be ) { } } } | This method tries to map the values of the given object on the valueModels of the formModel . Instead of setting the object as a backing object all valueModels are processed one by one and the corresponding property value is fetched from the objectToMap and set on that valueModel . This triggers the usual buffering etc . just as if the user entered the values . |
7,057 | private void saveDockingContext ( VLDockingApplicationPage dockingPage ) { DockingContext dockingContext = dockingPage . getDockingContext ( ) ; VLDockingPageDescriptor vlDockingPageDescriptor = ValkyrieRepository . getInstance ( ) . getBean ( dockingPage . getId ( ) , VLDockingPageDescriptor . class ) ; BufferedOutputStream buffOs = null ; try { File desktopLayoutFile = vlDockingPageDescriptor . getInitialLayout ( ) . getFile ( ) ; checkForConfigPath ( desktopLayoutFile ) ; buffOs = new BufferedOutputStream ( new FileOutputStream ( desktopLayoutFile ) ) ; dockingContext . writeXML ( buffOs ) ; buffOs . close ( ) ; logger . debug ( "Wrote docking context to config file " + desktopLayoutFile ) ; } catch ( IOException e ) { logger . warn ( "Error writing VLDocking config" , e ) ; } finally { try { if ( buffOs != null ) buffOs . close ( ) ; } catch ( Exception e ) { logger . debug ( "Error closing layoutfile" , e ) ; } } } | Saves the docking layout of a docking page fo the application |
7,058 | private void checkForConfigPath ( File configFile ) { String desktopLayoutFilePath = configFile . getAbsolutePath ( ) ; String configDirPath = desktopLayoutFilePath . substring ( 0 , desktopLayoutFilePath . lastIndexOf ( System . getProperty ( "file.separator" ) ) ) ; File configDir = new File ( configDirPath ) ; if ( ! configDir . exists ( ) ) { boolean success = configDir . mkdirs ( ) ; if ( success ) logger . debug ( "Newly created config directory" ) ; else logger . warn ( "Could not create config directory" ) ; } } | Creates the config directory if it doesn t exist already |
7,059 | public void setModel ( ListModel model ) { helperList . setModel ( model ) ; dataModel = model ; clearSelection ( ) ; Dimension d = helperScroller . getPreferredSize ( ) ; chosenPanel . setPreferredSize ( d ) ; sourcePanel . setPreferredSize ( d ) ; } | Sets the model that represents the contents or value of the list and clears the list selection . |
7,060 | public void setVisibleRowCount ( int visibleRowCount ) { sourceList . setVisibleRowCount ( visibleRowCount ) ; chosenList . setVisibleRowCount ( visibleRowCount ) ; helperList . setVisibleRowCount ( visibleRowCount ) ; Dimension d = helperScroller . getPreferredSize ( ) ; chosenPanel . setPreferredSize ( d ) ; sourcePanel . setPreferredSize ( d ) ; } | Sets the preferred number of rows in the list that can be displayed without a scrollbar . |
7,061 | public void setEditIcon ( Icon editIcon , String text ) { if ( editIcon != null ) { editButton . setIcon ( editIcon ) ; if ( text != null ) { editButton . setToolTipText ( text ) ; } editButton . setText ( "" ) ; } else { editButton . setIcon ( null ) ; if ( text != null ) { editButton . setText ( text ) ; } } } | Set the icon to use on the edit button . If no icon is specified then just the label will be used otherwise the text will be a tooltip . |
7,062 | public void setListLabels ( String chosenLabel , String sourceLabel ) { if ( chosenLabel != null ) { this . chosenLabel . setText ( chosenLabel ) ; this . chosenLabel . setVisible ( true ) ; } else { this . chosenLabel . setVisible ( false ) ; } if ( sourceLabel != null ) { this . sourceLabel . setText ( sourceLabel ) ; this . sourceLabel . setVisible ( true ) ; } else { this . sourceLabel . setVisible ( false ) ; } Dimension d = chosenList . getPreferredSize ( ) ; Dimension d1 = this . chosenLabel . getPreferredSize ( ) ; Dimension dChosenPanel = chosenPanel . getPreferredSize ( ) ; dChosenPanel . width = Math . max ( d . width , Math . max ( dChosenPanel . width , d1 . width ) ) ; chosenPanel . setPreferredSize ( dChosenPanel ) ; Dimension dSourceList = sourceList . getPreferredSize ( ) ; Dimension dSource = this . sourceLabel . getPreferredSize ( ) ; Dimension dSourcePanel = sourcePanel . getPreferredSize ( ) ; dSourcePanel . width = Math . max ( dSource . width , Math . max ( dSourceList . width , dSourcePanel . width ) ) ; sourcePanel . setPreferredSize ( dSourcePanel ) ; Dimension fullPanelSize = getPreferredSize ( ) ; fullPanelSize . width = dSourcePanel . width + dChosenPanel . width + ( editButton != null ? editButton . getPreferredSize ( ) . width : 0 ) + ( buttonPanel != null ? buttonPanel . getPreferredSize ( ) . width : 0 ) + 20 ; setPreferredSize ( fullPanelSize ) ; } | Add labels on top of the 2 lists . If not present do not show the labels . |
7,063 | protected JComponent buildComponent ( ) { helperList . setSelectionMode ( ListSelectionModel . MULTIPLE_INTERVAL_SELECTION ) ; GridBagLayout gbl = new GridBagLayout ( ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; setLayout ( gbl ) ; editButton = new JButton ( "Edit..." ) ; editButton . setIconTextGap ( 0 ) ; editButton . setMargin ( new Insets ( 2 , 4 , 2 , 4 ) ) ; editButton . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent event ) { togglePanels ( ) ; } } ) ; gbc . fill = GridBagConstraints . NONE ; gbc . weightx = 0.0 ; gbc . weighty = 0.0 ; gbc . insets = new Insets ( 0 , 0 , 0 , 3 ) ; gbc . anchor = GridBagConstraints . NORTHWEST ; gbl . setConstraints ( editButton , gbc ) ; add ( editButton ) ; sourceList . setSelectionMode ( ListSelectionModel . MULTIPLE_INTERVAL_SELECTION ) ; sourceList . addKeyListener ( new KeyAdapter ( ) { public void keyPressed ( final KeyEvent e ) { if ( e . getKeyCode ( ) == KeyEvent . VK_ENTER || e . getKeyCode ( ) == KeyEvent . VK_RIGHT ) { moveLeftToRight ( ) ; } } } ) ; gbc . fill = GridBagConstraints . BOTH ; gbc . weightx = 1.0 ; gbc . weighty = 1.0 ; sourcePanel . add ( BorderLayout . NORTH , sourceLabel ) ; JScrollPane sourceScroller = new JScrollPane ( sourceList ) ; sourcePanel . add ( BorderLayout . CENTER , sourceScroller ) ; gbl . setConstraints ( sourcePanel , gbc ) ; add ( sourcePanel ) ; JPanel buttonPanel = buildButtonPanel ( ) ; gbc . fill = GridBagConstraints . VERTICAL ; gbc . weightx = 0 ; gbc . weighty = 1.0 ; gbl . setConstraints ( buttonPanel , gbc ) ; add ( buttonPanel ) ; chosenList . setSelectionMode ( ListSelectionModel . MULTIPLE_INTERVAL_SELECTION ) ; chosenList . addKeyListener ( new KeyAdapter ( ) { public void keyPressed ( final KeyEvent e ) { if ( e . getKeyCode ( ) == KeyEvent . VK_ENTER || e . getKeyCode ( ) == KeyEvent . VK_LEFT ) { moveRightToLeft ( ) ; } } } ) ; gbc . fill = GridBagConstraints . BOTH ; gbc . weightx = 1.0 ; gbc . weighty = 1.0 ; chosenPanel . add ( BorderLayout . NORTH , chosenLabel ) ; JScrollPane chosenScroller = new JScrollPane ( chosenList ) ; chosenPanel . add ( BorderLayout . CENTER , chosenScroller ) ; gbl . setConstraints ( chosenPanel , gbc ) ; add ( chosenPanel ) ; editButton . setVisible ( showEditButton ) ; this . buttonPanel . setVisible ( panelsShowing ) ; sourcePanel . setVisible ( panelsShowing ) ; return this ; } | Build our component panel . |
7,064 | protected JPanel buildButtonPanel ( ) { buttonPanel = new JPanel ( ) ; leftToRight = new JButton ( ">" ) ; allLeftToRight = new JButton ( ">>" ) ; rightToLeft = new JButton ( "<" ) ; allRightToLeft = new JButton ( "<<" ) ; Font smallerFont = leftToRight . getFont ( ) . deriveFont ( 9.0F ) ; leftToRight . setFont ( smallerFont ) ; allLeftToRight . setFont ( smallerFont ) ; rightToLeft . setFont ( smallerFont ) ; allRightToLeft . setFont ( smallerFont ) ; Insets margin = new Insets ( 2 , 4 , 2 , 4 ) ; leftToRight . setMargin ( margin ) ; allLeftToRight . setMargin ( margin ) ; rightToLeft . setMargin ( margin ) ; allRightToLeft . setMargin ( margin ) ; GridBagLayout gbl = new GridBagLayout ( ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; buttonPanel . setLayout ( gbl ) ; gbc . gridwidth = GridBagConstraints . REMAINDER ; gbc . fill = GridBagConstraints . HORIZONTAL ; gbl . setConstraints ( leftToRight , gbc ) ; gbl . setConstraints ( allLeftToRight , gbc ) ; gbl . setConstraints ( rightToLeft , gbc ) ; gbl . setConstraints ( allRightToLeft , gbc ) ; buttonPanel . add ( leftToRight ) ; buttonPanel . add ( allLeftToRight ) ; buttonPanel . add ( rightToLeft ) ; buttonPanel . add ( allRightToLeft ) ; leftToRight . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent event ) { moveLeftToRight ( ) ; } } ) ; allLeftToRight . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent event ) { moveAllLeftToRight ( ) ; } } ) ; rightToLeft . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent event ) { moveRightToLeft ( ) ; } } ) ; allRightToLeft . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent event ) { moveAllRightToLeft ( ) ; } } ) ; buttonPanel . setBorder ( BorderFactory . createEmptyBorder ( 2 , 2 , 2 , 2 ) ) ; return buttonPanel ; } | Construct the control button panel . |
7,065 | protected void moveLeftToRight ( ) { Object [ ] sourceSelected = sourceList . getSelectedValues ( ) ; int nSourceSelected = sourceSelected . length ; int [ ] currentSelection = helperList . getSelectedIndices ( ) ; int [ ] newSelection = new int [ currentSelection . length + nSourceSelected ] ; System . arraycopy ( currentSelection , 0 , newSelection , 0 , currentSelection . length ) ; int destPos = currentSelection . length ; for ( int i = 0 ; i < sourceSelected . length ; i ++ ) { newSelection [ destPos ++ ] = indexOf ( sourceSelected [ i ] ) ; } helperList . setSelectedIndices ( newSelection ) ; update ( ) ; } | Move the selected items in the source list to the chosen list . I . e . add the items to our selection model . |
7,066 | protected void moveAllLeftToRight ( ) { int sz = dataModel . getSize ( ) ; int [ ] selected = new int [ sz ] ; for ( int i = 0 ; i < sz ; i ++ ) { selected [ i ] = i ; } helperList . setSelectedIndices ( selected ) ; update ( ) ; } | Move all the source items to the chosen side . I . e . select all the items . |
7,067 | protected void moveRightToLeft ( ) { Object [ ] chosenSelectedValues = chosenList . getSelectedValues ( ) ; int nChosenSelected = chosenSelectedValues . length ; int [ ] chosenSelected = new int [ nChosenSelected ] ; if ( nChosenSelected == 0 ) { return ; } int [ ] currentSelected = helperList . getSelectedIndices ( ) ; int nCurrentSelected = currentSelected . length ; for ( int i = 0 ; i < nChosenSelected ; i ++ ) { chosenSelected [ i ] = indexOf ( chosenSelectedValues [ i ] ) ; } int newSelection [ ] = new int [ nCurrentSelected - nChosenSelected ] ; int newSelPos = 0 ; int chosenPos = 0 ; for ( int i = 0 ; i < nCurrentSelected ; i ++ ) { int currentIdx = currentSelected [ i ] ; if ( chosenPos < nChosenSelected && currentIdx == chosenSelected [ chosenPos ] ) { chosenPos += 1 ; } else { newSelection [ newSelPos ++ ] = currentIdx ; } } helperList . setSelectedIndices ( newSelection ) ; update ( ) ; } | Move the selected items in the chosen list to the source list . I . e . remove them from our selection model . |
7,068 | protected int indexOf ( final Object o ) { final int size = dataModel . getSize ( ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( comparator == null ) { if ( o . equals ( dataModel . getElementAt ( i ) ) ) { return i ; } } else if ( comparator . compare ( o , dataModel . getElementAt ( i ) ) == 0 ) { return i ; } } return - 1 ; } | Get the index of a given object in the underlying data model . |
7,069 | protected void update ( ) { int sz = dataModel . getSize ( ) ; int [ ] selected = helperList . getSelectedIndices ( ) ; ArrayList sourceItems = new ArrayList ( sz ) ; ArrayList chosenItems = new ArrayList ( selected . length ) ; for ( int i = 0 ; i < sz ; i ++ ) { sourceItems . add ( dataModel . getElementAt ( i ) ) ; } for ( int i = selected . length - 1 ; i >= 0 ; i -- ) { chosenItems . add ( sourceItems . remove ( selected [ i ] ) ) ; } Collections . reverse ( chosenItems ) ; sourceList . setListData ( sourceItems . toArray ( ) ) ; chosenList . setListData ( chosenItems . toArray ( ) ) ; } | Update the two lists based on the current selection indices . |
7,070 | protected Object convertValue ( Object value , Class targetClass ) throws ConversionException { Assert . notNull ( value ) ; Assert . notNull ( targetClass ) ; return getConversionService ( ) . getConversionExecutor ( value . getClass ( ) , targetClass ) . execute ( value ) ; } | Converts the given object value into the given targetClass |
7,071 | public void setValue ( Object value ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Setting buffered value to '" + value + "'" ) ; } final Object oldValue = getValue ( ) ; this . bufferedValue = value ; updateBuffering ( ) ; fireValueChange ( oldValue , bufferedValue ) ; } | Sets a new buffered value and turns this BufferedValueModel into the buffering state . The buffered value is not provided to the underlying model until the trigger channel indicates a commit . |
7,072 | protected void onWrappedValueChanged ( ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Wrapped model value has changed; new value is '" + wrappedModel . getValue ( ) + "'" ) ; } setValue ( wrappedModel . getValue ( ) ) ; } | Called when the value held by the wrapped value model changes . |
7,073 | public void commit ( ) { if ( isBuffering ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Committing buffered value '" + getValue ( ) + "' to wrapped value model '" + wrappedModel + "'" ) ; } wrappedModel . setValueSilently ( getValueToCommit ( ) , wrappedModelChangeHandler ) ; setValue ( wrappedModel . getValue ( ) ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "No buffered edit to commit; nothing to do..." ) ; } } } | Commits the value buffered by this value model back to the wrapped value model . |
7,074 | private void updateBuffering ( ) { boolean wasBuffering = isBuffering ( ) ; buffering = hasValueChanged ( wrappedModel . getValue ( ) , bufferedValue ) ; firePropertyChange ( BUFFERING_PROPERTY , wasBuffering , buffering ) ; } | Updates the value of the buffering property . Fires a property change event if there s been a change . |
7,075 | public final void revert ( ) { if ( isBuffering ( ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Reverting buffered value '" + getValue ( ) + "' to value '" + wrappedModel . getValue ( ) + "'" ) ; } setValue ( wrappedModel . getValue ( ) ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "No buffered edit to commit; nothing to do..." ) ; } } } | Reverts the value held by the value model back to the value held by the wrapped value model . |
7,076 | public AbstractButton configure ( AbstractButton button ) { Assert . notNull ( button ) ; button . setText ( this . labelInfo . getText ( ) ) ; button . setMnemonic ( this . labelInfo . getMnemonic ( ) ) ; button . setDisplayedMnemonicIndex ( this . labelInfo . getMnemonicIndex ( ) ) ; configureAccelerator ( button , getAccelerator ( ) ) ; return button ; } | Configures an existing button appropriately based on this label info s properties . |
7,077 | protected void configureAccelerator ( AbstractButton button , KeyStroke keystrokeAccelerator ) { if ( ( button instanceof JMenuItem ) && ! ( button instanceof JMenu ) ) { ( ( JMenuItem ) button ) . setAccelerator ( keystrokeAccelerator ) ; } } | Sets the given keystroke accelerator on the given button . |
7,078 | protected String getRequiredMessage ( final String [ ] messageKeys ) { MessageSourceResolvable resolvable = new MessageSourceResolvable ( ) { public String [ ] getCodes ( ) { return messageKeys ; } public Object [ ] getArguments ( ) { return null ; } public String getDefaultMessage ( ) { if ( messageKeys . length > 0 ) { return messageKeys [ 0 ] ; } return "" ; } } ; return getMessages ( ) . getMessage ( resolvable ) ; } | Get the message for the given key . Don t throw an exception if it s not found but return a default value . |
7,079 | public JTable createTable ( TableModel model ) { return ( getTableFactory ( ) != null ) ? getTableFactory ( ) . createTable ( model ) : new JTable ( model ) ; } | Construct a JTable with the specified table model . It will delegate the creation to a TableFactory if it exists . |
7,080 | private String [ ] createLabels ( final String id , final Object [ ] keys ) { String [ ] messages = new String [ keys . length ] ; for ( int i = 0 ; i < messages . length ; ++ i ) { messages [ i ] = getApplicationConfig ( ) . messageResolver ( ) . getMessage ( id , keys [ i ] == null ? "null" : keys [ i ] . toString ( ) , "label" ) ; } return messages ; } | Will resolve keys to messages using id . key . label as a message resource key . |
7,081 | public static Collection getLabelsFromMap ( Collection sortedKeys , Map keysAndLabels ) { Collection < Object > labels = new ArrayList < Object > ( ) ; Iterator keyIt = sortedKeys . iterator ( ) ; while ( keyIt . hasNext ( ) ) { labels . add ( keysAndLabels . get ( keyIt . next ( ) ) ) ; } return labels ; } | Will extract labels from a map in sorted order . |
7,082 | static String constructCounterShardIdentifier ( final String counterName , final int shardNumber ) { Preconditions . checkNotNull ( counterName ) ; Preconditions . checkArgument ( ! StringUtils . isBlank ( counterName ) , "CounterData Names may not be null, blank, or empty!" ) ; Preconditions . checkArgument ( shardNumber >= 0 , "shardNumber must be greater than or equal to 0!" ) ; return counterName + COUNTER_SHARD_KEY_SEPARATOR + shardNumber ; } | Helper method to set the internal identifier for this entity . |
7,083 | public Object call ( Object value ) { if ( value == null ) { return new Integer ( 0 ) ; } return new Integer ( String . valueOf ( value ) . length ( ) ) ; } | Evaluate the string form of the object returning an Integer representing the string length . |
7,084 | public void addRules ( Rules rules ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Adding rules -> " + rules ) ; } addRules ( DEFAULT_CONTEXT_ID , rules ) ; } | Add or update the rules for a single bean class . |
7,085 | public static String getParentPropertyPath ( String propertyPath ) { int propertySeparatorIndex = getLastNestedPropertySeparatorIndex ( propertyPath ) ; return propertySeparatorIndex == - 1 ? "" : propertyPath . substring ( 0 , propertySeparatorIndex ) ; } | Returns the path to the parent component of the provided property path . |
7,086 | public static String getPropertyName ( String propertyPath ) { int propertySeparatorIndex = PropertyAccessorUtils . getLastNestedPropertySeparatorIndex ( propertyPath ) ; return propertySeparatorIndex == - 1 ? propertyPath : propertyPath . substring ( propertySeparatorIndex + 1 ) ; } | Returns the last component of the specified property path |
7,087 | public static boolean isIndexedProperty ( String propertyName ) { return propertyName . indexOf ( PropertyAccessor . PROPERTY_KEY_PREFIX_CHAR ) != - 1 && propertyName . charAt ( propertyName . length ( ) - 1 ) == PropertyAccessor . PROPERTY_KEY_SUFFIX_CHAR ; } | Tests whether the specified property path denotes an indexed property . |
7,088 | public Constraint regexp ( String regexp , String type ) { RegexpConstraint c = new RegexpConstraint ( regexp ) ; c . setType ( type ) ; return c ; } | Creates a constraint backed by a regular expression with a type for reporting . |
7,089 | public Constraint method ( Object target , String methodName , String constraintType ) { return new MethodInvokingConstraint ( target , methodName , constraintType ) ; } | Returns a constraint whose test is determined by a boolean method on a target object . |
7,090 | public Constraint not ( Constraint constraint ) { if ( ! ( constraint instanceof Not ) ) return new Not ( constraint ) ; return ( ( Not ) constraint ) . getConstraint ( ) ; } | Negate the specified constraint . |
7,091 | public PropertyConstraint all ( String propertyName , Constraint [ ] constraints ) { return value ( propertyName , all ( constraints ) ) ; } | Apply an all value constraint to the provided bean property . |
7,092 | public PropertyConstraint any ( String propertyName , Constraint [ ] constraints ) { return value ( propertyName , any ( constraints ) ) ; } | Apply an any value constraint to the provided bean property . |
7,093 | public PropertyConstraint eq ( String propertyName , Object propertyValue ) { return new ParameterizedPropertyConstraint ( propertyName , eq ( propertyValue ) ) ; } | Apply a equal to constraint to a bean property . |
7,094 | public PropertyConstraint gt ( String propertyName , Comparable propertyValue ) { return new ParameterizedPropertyConstraint ( propertyName , gt ( propertyValue ) ) ; } | Apply a greater than constraint to a bean property . |
7,095 | public PropertyConstraint gte ( String propertyName , Comparable propertyValue ) { return new ParameterizedPropertyConstraint ( propertyName , gte ( propertyValue ) ) ; } | Apply a greater than equal to constraint to a bean property . |
7,096 | public PropertyConstraint lt ( String propertyName , Comparable propertyValue ) { return new ParameterizedPropertyConstraint ( propertyName , lt ( propertyValue ) ) ; } | Apply a less than constraint to a bean property . |
7,097 | public PropertyConstraint lte ( String propertyName , Comparable propertyValue ) { return new ParameterizedPropertyConstraint ( propertyName , lte ( propertyValue ) ) ; } | Apply a less than equal to constraint to a bean property . |
7,098 | public PropertyConstraint eqProperty ( String propertyName , String otherPropertyName ) { return valueProperties ( propertyName , EqualTo . instance ( ) , otherPropertyName ) ; } | Apply a equal to constraint to two bean properties . |
7,099 | public PropertyConstraint gtProperty ( String propertyName , String otherPropertyName ) { return valueProperties ( propertyName , GreaterThan . instance ( ) , otherPropertyName ) ; } | Apply a greater than constraint to two properties |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.