idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
15,800 | public float getNextFrequency ( float delta ) throws IOException { float last = frequencyCounter . getFrequency ( ) ; float min = last - delta ; float max = last + delta ; while ( true ) { int sample = getSample ( ) ; if ( frequencyCounter . update ( sample ) ) { float next = frequencyCounter . getFrequency ( ) ; if ( ... | Returns next frequency that deviates more than delta from previous . |
15,801 | public float getHalfWave ( ) throws IOException { while ( true ) { int sample = getSample ( ) ; if ( frequencyCounter . update ( sample ) ) { return frequencyCounter . getFrequency ( ) ; } } } | Reads one half - wave and returns frequency |
15,802 | public List < Dependency > asList ( boolean withChildren ) { if ( withChildren ) { return new ArrayList < > ( asSet ( ) ) ; } else { if ( list != null ) { return new ArrayList < > ( list ) ; } else { return new ArrayList < > ( ) ; } } } | Returns the dependencies as a list |
15,803 | public Set < Dependency > asSet ( boolean withChildren ) { if ( withChildren ) { Set < Dependency > dependencySet = new HashSet < > ( ) ; List < Dependency > dependencyList = asList ( false ) ; dependencySet . addAll ( dependencyList ) ; for ( Dependency dependency : dependencyList ) { if ( dependency . isInternal ( ) ... | Returns the dependencies as a set |
15,804 | public final void insert ( ClusterName targetCluster , TableMetadata targetTable , Row row , boolean isNotExists ) throws UnsupportedException , ExecutionException { try { connectionHandler . startJob ( targetCluster . getName ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Inserting one row in table [" ... | Insert a single row in a table . |
15,805 | public final void update ( ClusterName targetCluster , TableName tableName , Collection < Relation > assignments , Collection < Filter > whereClauses ) throws UnsupportedException , ExecutionException { try { connectionHandler . startJob ( targetCluster . getName ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . de... | This method updates data of a table according to some conditions . |
15,806 | public final void truncate ( ClusterName targetCluster , TableName tableName ) throws UnsupportedException , ExecutionException { try { connectionHandler . startJob ( targetCluster . getName ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Tuncating table [" + tableName . getName ( ) + "] in cluster [" + ... | This method deletes all the rows of a table . |
15,807 | public File getDestPath ( String sourcePath ) { String destPathname = DBConstants . BLANK ; String dirPrefix = this . getProperty ( DIR_PREFIX ) ; String sourceDir = this . getProperty ( SOURCE_DIR ) ; String destDir = this . getProperty ( DEST_DIR ) ; int startPath = sourcePath . indexOf ( sourceDir ) ; if ( ( dirPref... | Get the destination pathname . |
15,808 | public ScanListener getScanListener ( ) { if ( m_listener == null ) { String strClassName = this . getProperty ( LISTENER_CLASS ) ; if ( strClassName == null ) strClassName = ReplaceScanListener . class . getName ( ) ; m_listener = ( ScanListener ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( s... | Get the scan listener . |
15,809 | public String getFullPath ( String pathToFix ) { String dirPrefix = this . getProperty ( DIR_PREFIX ) ; if ( dirPrefix == null ) dirPrefix = Utility . addToPath ( System . getProperty ( "user.home" ) , "workspace/tourgeek/src/com/tourgeek" ) ; if ( pathToFix == null ) pathToFix = dirPrefix ; else if ( ( ! pathToFix . s... | Get the full path name . |
15,810 | private static void addFile ( final File file , final File dirToZip , final ZipOutputStream zos ) throws IOException { final String absolutePath = file . getAbsolutePath ( ) ; final int index = absolutePath . indexOf ( dirToZip . getName ( ) ) ; final String zipEntryName = absolutePath . substring ( index , absolutePat... | Adds the file . |
15,811 | public static boolean isZip ( final String filename ) { for ( final String element : FileConst . ZIP_EXTENSIONS ) { if ( filename . endsWith ( element ) ) { return true ; } } return false ; } | Checks if the given filename is a zip - file . |
15,812 | public void setTimecodeBase ( int timecodeBase ) { if ( timecodeBase < 0 ) { timecodeBase = 0 ; } if ( this . timecodeBase > 0 && timecodeBase != this . timecodeBase ) { this . frames = ( int ) Math . round ( ( double ) this . frames * timecodeBase / this . timecodeBase ) ; } this . timecodeBase = timecodeBase ; innerS... | Changes timecode base of the timecode |
15,813 | public void setHMSF ( int hours , int minutes , int seconds , int frames ) { innerSetHMSF ( hours , minutes , seconds , frames ) ; } | Sets the timecode to the provided hours minutes seconds and frames |
15,814 | public void open ( String strKeyArea , int iOpenMode , boolean bDirection , String strFields , Object objInitialKey , Object objEndKey , byte [ ] byBehaviorData ) throws DBException , RemoteException { BaseTransport transport = this . createProxyTransport ( OPEN ) ; transport . addParam ( KEY , strKeyArea ) ; transport... | Open - Receive to this server and send the response . |
15,815 | public org . jbundle . thin . base . db . FieldList makeFieldList ( String strFieldsToInclude ) throws RemoteException { BaseTransport transport = this . createProxyTransport ( MAKE_FIELD_LIST ) ; transport . addParam ( FIELDS , strFieldsToInclude ) ; Object strReturn = transport . sendMessageAndGetReply ( ) ; Object o... | Make a thin FieldList for this table . Usually used for special queries that don t have a field list available . |
15,816 | public void dispose ( ) { try { if ( generator != null ) { generator . writeEndArray ( ) ; generator . close ( ) ; } this . getWriter ( ) . close ( ) ; } catch ( IOException ioe ) { logger . error ( "Unable to close writer" , ioe ) ; logger . trace ( ioe . getMessage ( ) , ioe ) ; } finally { generator = null ; this . ... | Closes the output writer . |
15,817 | private boolean consideringHierarchy ( Publish p ) { boolean sent = false ; for ( Entry < Class < ? > , List < SubscriberParent > > e : p . mapping . entrySet ( ) ) { if ( e . getKey ( ) . isAssignableFrom ( p . message . getClass ( ) ) ) { for ( SubscriberParent parent : e . getValue ( ) ) { if ( ! predicateApplies ( ... | Iterates through the subscribers considering the type hierarchy and invokes the receiveO method . |
15,818 | private boolean normal ( Publish p ) { boolean sent = false ; List < SubscriberParent > list = p . mapping . get ( p . message . getClass ( ) ) ; if ( list == null ) { return false ; } for ( SubscriberParent sp : list ) { Subscriber < ? > s = sp . getSubscriber ( ) ; if ( ! predicateApplies ( s , p . message ) ) { cont... | Iterates through the subscribers invoking the receiveO method . |
15,819 | private boolean predicateApplies ( Subscriber < ? > s , Object message ) { if ( s instanceof PredicatedSubscriber && ! ( ( PredicatedSubscriber < ? > ) s ) . appliesO ( message ) ) { return false ; } return true ; } | Checks to see if the subscriber is a predicated subscriber and if it applies . |
15,820 | public boolean isEmpty ( ) { if ( m_filter != null ) return false ; if ( m_mapNameValue != null ) if ( m_mapNameValue . size ( ) != 0 ) return false ; return true ; } | Is this node empty . |
15,821 | public Map < String , NameValue > getValueMap ( boolean bAddIfNotFound ) { if ( m_mapNameValue == null ) if ( bAddIfNotFound ) m_mapNameValue = new Hashtable < String , NameValue > ( ) ; return m_mapNameValue ; } | Get the next Lower nodes . |
15,822 | public boolean removeNameValueNode ( NameValue node ) { Map < String , NameValue > map = this . getValueMap ( false ) ; if ( map == null ) return false ; return ( map . remove ( node . getKey ( ) ) == node ) ; } | Add this node to my value map . |
15,823 | public void addThisMessageFilter ( BaseMessageFilter filter ) { if ( m_filter == null ) m_filter = filter ; else { if ( m_filter instanceof BaseMessageFilter ) { BaseMessageFilter filterFirst = ( BaseMessageFilter ) m_filter ; m_filter = new Hashtable < String , Object > ( ) ; ( ( Map ) m_filter ) . put ( filterFirst .... | Set the owner of this value . |
15,824 | public boolean removeThisMessageFilter ( BaseMessageFilter filter ) { if ( m_filter instanceof BaseMessageFilter ) { if ( m_filter != filter ) return false ; m_filter = null ; return true ; } else return ( ( ( Map ) m_filter ) . remove ( filter . getFilterID ( ) ) != null ) ; } | Remove this filter from the filter list . |
15,825 | public Iterator getFilterIterator ( ) { if ( m_filter instanceof Map ) return ( ( Map ) m_filter ) . values ( ) . iterator ( ) ; else if ( m_filter != null ) return new OneFilterIterator ( ) ; else return null ; } | Get the list of filters for this leaf node . |
15,826 | protected boolean isAvailable ( URL url ) { try ( InputStream inputStream = url . openStream ( ) ) { return true ; } catch ( IOException e ) { LOG . debug ( "URL {} not available" , url , e ) ; return false ; } } | Checks the availability of a URL by openening a reading stream on it . |
15,827 | public void add ( double value ) { max = Math . max ( max , value ) ; min = Math . min ( min , value ) ; if ( count == 0 ) { average = value ; } else { average = count * average / ( count + 1 ) + value / ( count + 1 ) ; deviationSquare = count * deviationSquare / ( count + 1 ) + Math . pow ( value - average , 2 ) / ( c... | Add a new value . |
15,828 | public void clear ( ) { count = 0 ; average = 0 ; max = Double . MIN_VALUE ; min = Double . MAX_VALUE ; deviationSquare = 0 ; } | Clears the added values . |
15,829 | public int select ( long timeout ) throws IOException { fine ( "select(" + timeout + ")" ) ; lock . lock ( ) ; try { ensureAllRunning ( ) ; try { SelKey sk = queue . poll ( timeout , TimeUnit . MILLISECONDS ) ; if ( sk != null ) { selectedKeys . add ( sk ) ; queue . drainTo ( selectedKeys ) ; selectedKeys . remove ( WA... | Selects and waits . |
15,830 | public MDecimal getMPH ( ) { MDecimal result = new MDecimal ( currentUnit . getConverterTo ( MILES_PER_HOUR ) . convert ( doubleValue ( ) ) ) ; logger . trace ( MMarker . GETTER , "Converting from {} to MPS : {}" , currentUnit , result ) ; return result ; } | Miles per hour |
15,831 | public static void restoreFieldParam ( PropertyOwner propertyOwner , Field field ) { String strFieldName = field . getFieldName ( ) ; if ( propertyOwner . getProperty ( strFieldName ) != null ) field . setString ( ( String ) propertyOwner . getProperty ( strFieldName ) ) ; } | RestoreProductParam Method . |
15,832 | public static String propertiesToURL ( String strURL , Map < String , Object > properties ) { if ( properties != null ) { for ( String strKey : properties . keySet ( ) ) { Object strValue = properties . get ( strKey ) ; strURL = Utility . addURLParam ( strURL , strKey . toString ( ) , strValue . toString ( ) ) ; } } re... | Add to this URL using all the properties in this property list . |
15,833 | public static String [ ] propertiesToArgs ( Map < String , Object > properties ) { if ( properties == null ) return null ; String [ ] rgArgs = new String [ properties . size ( ) ] ; int i = 0 ; for ( String strKey : properties . keySet ( ) ) { Object strValue = properties . get ( strKey ) ; rgArgs [ i ++ ] = strKey . t... | Create an argument list using all the properties in this property list . |
15,834 | public static InputStream getStringInputStream ( String string ) { InputStream is = null ; try { ByteArrayOutputStream ba = new ByteArrayOutputStream ( ) ; DataOutputStream os = new DataOutputStream ( ba ) ; os . writeUTF ( string ) ; os . flush ( ) ; is = new ByteArrayInputStream ( ba . toByteArray ( ) ) ; } catch ( I... | A utility method to get an UTF - 8 Input stream from a string . |
15,835 | public static String endTag ( String string ) { if ( string . indexOf ( ' ' ) != - 1 ) string = string . substring ( 0 , string . indexOf ( ' ' ) ) ; return "</" + string + '>' ; } | Change this string to a XML end Text string . |
15,836 | public static String getAsFormattedString ( Map < String , Object > map , String strKey , Class < ? > classData , Object objDefault ) { Object objData = map . get ( strKey ) ; try { return Converter . formatObjectToString ( objData , classData , objDefault ) ; } catch ( Exception ex ) { return null ; } } | Get this item from the map and convert it to the target class . Convert this object to an formatted string . |
15,837 | public static Properties mapToProperties ( Map < String , Object > map ) { Properties properties = new Properties ( ) ; Iterator < ? extends Map . Entry < ? , ? > > i = map . entrySet ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Map . Entry < ? , ? > e = i . next ( ) ; properties . setProperty ( ( String ) e . getK... | Convert map to properties . |
15,838 | public static Map < String , Object > copyAppProperties ( Map < String , Object > properties , Map < String , Object > appProperties ) { if ( appProperties != null ) { appProperties = Utility . putAllIfNew ( new HashMap < String , Object > ( ) , appProperties ) ; if ( appProperties . get ( Params . APP_NAME ) != null )... | Copy the application properties to this map . |
15,839 | public static RecordOwner getRecordOwner ( RecordOwnerParent recordOwnerParent ) { if ( recordOwnerParent instanceof RecordOwner ) return ( RecordOwner ) recordOwnerParent ; RecordOwner recordOwner = null ; if ( recordOwnerParent != null ) if ( recordOwnerParent . getTask ( ) != null ) if ( recordOwnerParent . getTask ... | Get a recordowner from this recordOwnerParent . This method does a deep search using the listeners and the database connections to find a recordowner . |
15,840 | public static String getServletPath ( Task task , String strServletParam ) { String strServletName = null ; if ( strServletParam == null ) strServletParam = Params . SERVLET ; if ( task != null ) strServletName = task . getProperty ( strServletParam ) ; if ( ( strServletName == null ) || ( strServletName . length ( ) =... | Get the path to the target servlet . |
15,841 | public static String getSystemSuffix ( String suffix , String defaultSuffix ) { if ( defaultSuffix == null ) defaultSuffix = DEFAULT_SYSTEM_SUFFIX ; if ( suffix == null ) suffix = defaultSuffix ; for ( int i = suffix . length ( ) - 2 ; i > 0 ; i -- ) { if ( ! Character . isLetterOrDigit ( suffix . charAt ( i ) ) ) { su... | Get the system suffix fix it and return it . |
15,842 | public static boolean onPrint ( Component component , boolean bPrintHeader ) { PrinterJob job = PrinterJob . getPrinterJob ( ) ; ScreenPrinter fapp = new ScreenPrinter ( component , bPrintHeader ) ; job . setPrintable ( fapp ) ; if ( job . printDialog ( ) ) fapp . printJob ( job ) ; return true ; } | Print the current screen . |
15,843 | public void printJob ( PrinterJob job ) { Frame frame = this . getFrame ( ) ; dialog = new PrintDialog ( frame , false ) ; dialog . pack ( ) ; if ( frame != null ) this . centerDialogInFrame ( dialog , frame ) ; Map < String , Object > map = new Hashtable < String , Object > ( ) ; map . put ( "job" , job ) ; SyncPageWo... | Print this job . |
15,844 | public int print ( Graphics g , PageFormat pageFormat , int pageIndex ) { Graphics2D g2d = ( Graphics2D ) g ; if ( firstTime ) { m_componentPrint = new ComponentPrint ( null ) ; m_componentPrint . surveyComponents ( m_component ) ; m_paperPrint = new PaperPrint ( null ) ; m_paperPrint . surveyPage ( pageFormat , g2d , ... | Print this page . |
15,845 | public static void disableDoubleBuffering ( Component c ) { RepaintManager currentManager = RepaintManager . currentManager ( c ) ; currentManager . setDoubleBufferingEnabled ( false ) ; } | Turn the cache off so printing will work . |
15,846 | public static void enableDoubleBuffering ( Component c ) { RepaintManager currentManager = RepaintManager . currentManager ( c ) ; currentManager . setDoubleBufferingEnabled ( true ) ; } | Turn the cache back on . |
15,847 | public void centerDialogInFrame ( Dialog dialog , Frame frame ) { dialog . setLocation ( frame . getX ( ) + ( frame . getWidth ( ) - dialog . getWidth ( ) ) / 2 , frame . getY ( ) + ( frame . getHeight ( ) - dialog . getHeight ( ) ) / 2 ) ; } | Center this dialog in the frame . |
15,848 | public void free ( ) { super . free ( ) ; m_baOut = null ; m_daOut = null ; m_baIn = null ; m_daIn = null ; } | Release the objects connected to this buffer . |
15,849 | public void resetPosition ( ) { try { if ( m_daIn != null ) m_daIn . reset ( ) ; else if ( m_baOut != null ) { byte [ ] byInput = m_baOut . toByteArray ( ) ; this . setPhysicalData ( byInput ) ; } super . resetPosition ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } } | Set the position to the start for GetXXXX methods . |
15,850 | public Object getPhysicalData ( ) { if ( m_baOut == null ) { if ( m_baIn == null ) return null ; m_baIn . reset ( ) ; int iLen = m_baIn . available ( ) ; byte [ ] rgby = new byte [ iLen ] ; m_baIn . read ( rgby , 0 , iLen ) ; return rgby ; } return m_baOut . toByteArray ( ) ; } | Get the physical data that this Buffer uses . You must override this method . |
15,851 | private void addEntries ( final FileSystem zipFs ) throws IOException { for ( Map . Entry < String , URL > entry : contentMap . entrySet ( ) ) { final Path pathToFile = zipFs . getPath ( entry . getKey ( ) ) ; final URL resource = entry . getValue ( ) ; addResource ( pathToFile , resource ) ; } } | Adds the entries to the zip file that have been defined by the builder . |
15,852 | private FileSystem newZipFileSystem ( final File file ) throws IOException { final Map < String , String > env = new HashMap < > ( ) ; env . put ( "create" , "true" ) ; return newFileSystem ( URI . create ( "jar:" + file . toURI ( ) ) , env ) ; } | Creates a new zip file and exposes the zip file as a filesystem to which paths and files can be added . |
15,853 | private void addResource ( final Path pathToFile , final URL resource ) throws IOException { if ( resource == null ) { addFolder ( pathToFile ) ; } else { addEntry ( pathToFile , resource ) ; } } | Adds a resource respectively it s content to the filesystem at the position specified by the pathToFile |
15,854 | private void addEntry ( final Path pathToFile , final URL resource ) throws IOException { final Path parent = pathToFile . getParent ( ) ; if ( parent != null ) { addFolder ( parent ) ; } try ( InputStream inputStream = resource . openStream ( ) ) { Files . copy ( inputStream , pathToFile ) ; } } | Creates an entry under the specifeid path with the content from the provided resource . |
15,855 | public void handleGet ( HttpRequest request , HttpResponse response ) throws HttpException , IOException { String uri = request . getRequestLine ( ) . getUri ( ) ; LOG . debug ( "uri {}" , uri ) ; try { ResponseUpdater ru = this . findResponseUpdater ( request ) ; LOG . debug ( "request updater {}" , ru ) ; ru . update... | Handles GET requests by calling response updater based on uri pattern . |
15,856 | private ResponseUpdater findResponseUpdater ( final HttpRequest request ) throws HttpException { ResponseUpdater updater = this . responseUpdaterSet . stream ( ) . filter ( ru -> ru . matches ( request ) ) . findFirst ( ) . get ( ) ; if ( updater == null ) { throw new HttpException ( "cannot find correpsonding response... | Finds the first ResponseUpdater by url pattern match . |
15,857 | public static String getParameter ( HttpRequest request , String name ) throws URISyntaxException { NameValuePair nv = URLEncodedUtils . parse ( new URI ( request . getRequestLine ( ) . getUri ( ) ) , "UTF-8" ) . stream ( ) . filter ( param -> param . getName ( ) . equals ( name ) ) . findFirst ( ) . get ( ) ; if ( nv ... | Gets parameter value of request line . |
15,858 | public int getChildCount ( ) { if ( ! m_bHasLoaded ) { NodeData data = ( NodeData ) this . getUserObject ( ) ; if ( ( data == null ) || ( ! data . isLeaf ( ) ) ) this . loadChildren ( ) ; } return super . getChildCount ( ) ; } | If hasLoaded is false meaning the children have not yet been loaded loadChildren is messaged and super is messaged for the return value . |
15,859 | protected void loadChildren ( ) { DynamicTreeNode newNode ; NodeData dataParent = ( NodeData ) this . getUserObject ( ) ; FieldList fieldList = dataParent . makeRecord ( ) ; FieldTable fieldTable = fieldList . getTable ( ) ; m_fNameCount = 0 ; try { fieldTable . close ( ) ; while ( fieldTable . next ( ) != null ) { Str... | Messaged the first time getChildCount is messaged . Creates children with random names from names . |
15,860 | public static void zipFiles ( final ZipFile zipFile4j , final File ... toAdd ) throws ZipException { zipFiles ( zipFile4j , Zip4jConstants . COMP_DEFLATE , Zip4jConstants . DEFLATE_LEVEL_NORMAL , toAdd ) ; } | Adds a file or several files to the given zip file with the parameters Zip4jConstants . COMP_DEFLATE for the compression method and Zip4jConstants . DEFLATE_LEVEL_NORMAL as the compression level . |
15,861 | public static void zipFiles ( final ZipFile zipFile4j , final int compressionMethod , final int compressionLevel , final File ... toAdd ) throws ZipException { final ZipParameters parameters = new ZipParameters ( ) ; parameters . setCompressionMethod ( compressionMethod ) ; parameters . setCompressionLevel ( compressio... | Adds a file or several files to the given zip file with the given parameters for the compression method and the compression level . |
15,862 | public static Record getRecordFromDescription ( BaseField field , String strDesc ) { Record recSecond = ( ( ReferenceField ) field ) . getReferenceRecord ( ) ; return BaseFixData . getRecordFromDescription ( strDesc , null , recSecond ) ; } | GetRecordFromDescription Method . |
15,863 | public static boolean checkAbreviations ( String string , int i ) { for ( int index = 0 ; index < ABREVIATIONS . length ; index ++ ) { if ( ABREVIATIONS [ index ] . length ( ) > 1 ) if ( string . charAt ( i ) == ABREVIATIONS [ index ] . charAt ( 0 ) ) if ( string . length ( ) > i + 1 ) if ( string . charAt ( i + 1 ) ==... | CheckAbreviations Method . |
15,864 | public String getProperty ( String strName ) { Record recUserRegistration = this . getUserRegistration ( ) ; return ( ( PropertiesField ) recUserRegistration . getField ( UserRegistrationModel . PROPERTIES ) ) . getProperty ( strName ) ; } | Get the value associated with this key . |
15,865 | public ConstructorFilterBuilder isDefault ( ) { add ( new NegationConstructorFilter ( new ModifierConstructorFilter ( Modifier . PUBLIC & Modifier . PROTECTED & Modifier . PRIVATE ) ) ) ; return this ; } | Adds a filter for default access constructors only . |
15,866 | public ConstructorFilter build ( ) { if ( filters . isEmpty ( ) ) { throw new IllegalStateException ( "No filter specified." ) ; } if ( filters . size ( ) == 1 ) { return filters . get ( 0 ) ; } ConstructorFilter [ ] methodFilters = new ConstructorFilter [ filters . size ( ) ] ; filters . toArray ( methodFilters ) ; re... | Returns the ConstructorFilter built . |
15,867 | public static < T > DataKey < T > create ( String name , Class < T > dataClass ) { return create ( name , dataClass , true , null ) ; } | creates a data key with the given name and type . This data key allows for null values and sets no default value . |
15,868 | public static < T > DataKey < T > create ( String name , Class < T > dataClass , boolean allowNull , T defaultValue ) { if ( dataClass . isPrimitive ( ) ) { throw new IllegalArgumentException ( "primitives are not supported - please use their corresponding wrappers" ) ; } if ( dataClass . isArray ( ) ) { throw new Ille... | creates a data key with the given name data type the given permission to allow null values and a default value . You can set the default value to null to signal that there should be no default value . |
15,869 | public static < T > DataKey < T > create ( String name , GenericType < T > genType , boolean allowNull ) { return create ( name , genType . getRawType ( ) , allowNull , null ) ; } | creates a data key with the given name data type and the given permission to allow null values . No default value will be specified . |
15,870 | public void logAddRecord ( Rec record , int iSystemID ) { try { this . getTable ( ) . setProperty ( DBParams . SUPRESSREMOTEDBMESSAGES , DBConstants . TRUE ) ; this . getTable ( ) . getDatabase ( ) . setProperty ( DBParams . MESSAGES_TO_REMOTE , DBConstants . FALSE ) ; this . addNew ( ) ; this . getField ( AnalysisLog ... | Log that this record has been added . Call this from the end of record . init |
15,871 | public void logRemoveRecord ( Rec record , int iSystemID ) { try { this . getTable ( ) . setProperty ( DBParams . SUPRESSREMOTEDBMESSAGES , DBConstants . TRUE ) ; this . getTable ( ) . getDatabase ( ) . setProperty ( DBParams . MESSAGES_TO_REMOTE , DBConstants . FALSE ) ; this . addNew ( ) ; this . getField ( AnalysisL... | Log that this record has been freed . Call this from the end of record . free |
15,872 | public int doSubScriptCommands ( Script recScript , Map < String , Object > properties ) { int iErrorCode = DBConstants . NORMAL_RETURN ; Script recSubScript = recScript . getSubScript ( ) ; try { recSubScript . close ( ) ; while ( recSubScript . hasNext ( ) ) { recSubScript . next ( ) ; iErrorCode = this . doCommand (... | DoSubScriptCommands Method . |
15,873 | public int doRunCommand ( Script recScript , Map < String , Object > properties ) { ProcessRunnerTask processRunner = new ProcessRunnerTask ( this . getTask ( ) . getApplication ( ) , null , null ) ; processRunner . setProperties ( properties ) ; processRunner . run ( ) ; return DBConstants . NORMAL_RETURN ; } | DoRunCommand Method . |
15,874 | public int doSeekCommand ( Script recScript , Map < String , Object > properties ) { Record record = recScript . getTargetRecord ( properties , DBParams . RECORD ) ; if ( record == null ) return DBConstants . ERROR_RETURN ; for ( int iKeySeq = 0 ; iKeySeq < record . getKeyAreaCount ( ) ; iKeySeq ++ ) { String strKeyFie... | DoSeekCommand Method . |
15,875 | public int doCopyRecordsCommand ( Script recScript , Map < String , Object > properties ) { int iErrorCode = DBConstants . NORMAL_RETURN ; Record record = recScript . getTargetRecord ( properties , DBParams . RECORD ) ; if ( record == null ) return DBConstants . ERROR_RETURN ; if ( properties . get ( PARENT_RECORD ) !=... | DoCopyRecordsCommand Method . |
15,876 | public int doCopyFieldsCommand ( Script recScript , Map < String , Object > properties ) { int iErrorCode = DBConstants . NORMAL_RETURN ; Record recSource = recScript . getTargetRecord ( properties , DBParams . RECORD ) ; if ( recSource == null ) return DBConstants . ERROR_RETURN ; Record recDestination = recScript . g... | DoCopyFieldsCommand Method . |
15,877 | public int doCopyDataCommand ( Script recScript , Map < String , Object > properties ) { String strURL = ( String ) properties . get ( Script . SOURCE_PARAM ) ; String strDest = ( String ) properties . get ( Script . DESTINATION_PARAM ) ; if ( ( strURL != null ) && ( strDest != null ) ) Utility . transferURLStream ( st... | DoCopyDataCommand Method . |
15,878 | public void runDetail ( ) { Record recReplication = this . getMainRecord ( ) ; if ( ( recReplication . getEditMode ( ) == DBConstants . EDIT_NONE ) || ( recReplication . getEditMode ( ) == DBConstants . EDIT_ADD ) ) recReplication . getField ( Script . ID ) . setValue ( 0 ) ; String strSourcePath = "" ; String strDestP... | RunDetail Method . |
15,879 | public boolean processDetail ( Record parent , String strSourcePath , String strDestPath ) { boolean bSubsExist = false ; String strName ; Script recReplication = new Script ( this ) ; recReplication . setKeyArea ( Script . PARENT_FOLDER_ID_KEY ) ; recReplication . addListener ( new SubFileFilter ( parent ) ) ; try { s... | ProcessDetail Method . |
15,880 | public BaseMessage convertToThinMessage ( ) { int iChangeType = ( ( RecordMessageHeader ) this . getMessageHeader ( ) ) . getRecordMessageType ( ) ; Object data = this . getData ( ) ; BaseMessage messageTableUpdate = null ; { BaseMessageHeader messageHeader = new SessionMessageHeader ( this . getMessageHeader ( ) . get... | If you are sending a thick message to a thin client convert it first . Since BaseMessage is already so conversion is necessary ... return this message . |
15,881 | public Object getImageIcon ( Object value ) { int index = 0 ; if ( value instanceof Integer ) index = ( ( Integer ) value ) . intValue ( ) ; else if ( value != null ) { try { index = Integer . parseInt ( value . toString ( ) ) ; } catch ( NumberFormatException ex ) { } } return this . getIcon ( index ) ; } | Get the icon at this location . |
15,882 | public void addIcon ( Object icon , int iIndex ) { m_rgIcons [ iIndex ] = icon ; if ( this . getScreenFieldView ( ) . getControl ( ) instanceof ExtendedComponent ) ( ( ExtendedComponent ) this . getScreenFieldView ( ) . getControl ( ) ) . addIcon ( icon , iIndex ) ; } | Add an Icon to the Icon list . |
15,883 | private void copy ( Expression expression ) { this . operator = expression . operator ; this . elementsArray = expression . elementsArray ; this . elements = expression . elements ; } | Copies contents of given expression into this one . |
15,884 | private boolean addStatement ( StringBuffer statementBuffer ) { if ( statementBuffer . length ( ) > 0 ) { elements . add ( new Predicate ( statementBuffer . toString ( ) ) ) ; elementsArray = elements . toArray ( ) ; statementBuffer . delete ( 0 , statementBuffer . length ( ) ) ; return true ; } return false ; } | Adds a new statement to this Expression s elements . Clears the statementBuffer . |
15,885 | public void printHtmlControlDesc ( PrintWriter out , String strFieldDesc , int iHtmlAttributes ) { if ( ( iHtmlAttributes & HtmlConstants . HTML_ADD_DESC_COLUMN ) != 0 ) out . println ( "<td align=\"right\">" + strFieldDesc + "</td>" ) ; } | display this field s description in html format . |
15,886 | public void init ( BaseField field , Record record , String keyAreaName , boolean bCloseOnFree , boolean bUpdateRecord , boolean bAllowNull ) { super . init ( field ) ; m_record = record ; this . keyAreaName = keyAreaName ; m_keyField = null ; m_bCloseOnFree = bCloseOnFree ; m_bUpdateRecord = bUpdateRecord ; m_bAllowNu... | Initialize this listener . |
15,887 | public void setOwner ( ListenerOwner owner ) { super . setOwner ( owner ) ; if ( owner != null ) { MoveOnValidHandler moveBehavior = null ; m_record . setOpenMode ( m_record . getOpenMode ( ) | DBConstants . OPEN_CACHE_RECORDS ) ; m_bMoveBehavior = false ; ReadSecondaryHandler listenerDup = ( ReadSecondaryHandler ) thi... | Set the field that owns this listener . This method adds the methods that allow a record to read itself if the main key field is changed . |
15,888 | public MoveOnValidHandler addFieldPair ( BaseField fldDest , BaseField fldSource , boolean bMoveToDependent , boolean bMoveBackOnChange , Converter convCheckMark , Converter convBackconvCheckMark ) { MoveOnValidHandler moveBehavior = null ; if ( convCheckMark != null ) if ( convCheckMark . getField ( ) != null ) { Chec... | Add a field source and dest . |
15,889 | public MoveOnValidHandler addFieldSeqPair ( int iFieldSeq ) { m_bMoveBehavior = true ; MoveOnValidHandler moveBehavior = new MoveOnValidHandler ( this . getOwner ( ) . getRecord ( ) . getField ( iFieldSeq ) ) ; m_record . addListener ( moveBehavior ) ; return moveBehavior ; } | This method is specifically for making sure a handle is moved to this field on valid . The field must be a ReferenceField . |
15,890 | public MoveOnValidHandler addFieldSeqPair ( int iDestFieldSeq , int iSourceFieldSeq , boolean bMoveToDependent , boolean bMoveBackOnChange , Converter convCheckMark , Converter convBackconvCheckMark ) { return this . addFieldPair ( this . getOwner ( ) . getRecord ( ) . getField ( iDestFieldSeq ) , m_record . getField (... | Add the set of fields that will move on a valid record . |
15,891 | public int fieldChanged ( boolean bDisplayOption , int iMoveMode ) { int iErrorCode = DBConstants . NORMAL_RETURN ; if ( m_bUpdateRecord ) if ( m_record . isModified ( ) ) { try { if ( m_record . getEditMode ( ) == Constants . EDIT_IN_PROGRESS ) m_record . set ( ) ; else if ( m_record . getEditMode ( ) == Constants . E... | The Field has Changed . Read the secondary file . |
15,892 | private void pack ( String data ) { byte [ ] bytes = data . getBytes ( Constants . UTF8 ) ; buffer . put ( getLengthDescriptor ( bytes . length ) ) ; buffer . put ( bytes ) ; } | Pack an argument and place in buffer . |
15,893 | public void addParameters ( RPCParameters parameters ) { for ( int i = 0 ; i < parameters . getCount ( ) ; i ++ ) { RPCParameter parameter = parameters . get ( i ) ; if ( parameter . hasData ( ) != HasData . NONE ) { addParameter ( Integer . toString ( i + 1 ) , parameter ) ; } } } | Adds RPC parameters to the request . |
15,894 | public void addParameters ( Map < String , Object > parameters , boolean suppressNull ) { for ( String name : parameters . keySet ( ) ) { Object value = parameters . get ( name ) ; if ( ! suppressNull || value != null ) { addParameter ( name , value ) ; } } } | Adds map - based parameters to the request . |
15,895 | public void addParameter ( String name , String sub , Object data ) { pack ( name ) ; pack ( sub ) ; pack ( BrokerUtil . toString ( data ) ) ; } | Adds a subscripted parameter to the request . |
15,896 | public void addParameter ( String name , RPCParameter parameter ) { for ( String subscript : parameter ) { addParameter ( name , subscript , parameter . get ( subscript ) ) ; } } | Adds an RPC parameter to the request . |
15,897 | public void addParameter ( String name , Object value ) { String subscript = "" ; if ( name . contains ( "(" ) ) { String [ ] pcs = name . split ( "\\(" , 2 ) ; name = pcs [ 0 ] ; subscript = pcs [ 1 ] ; if ( subscript . endsWith ( ")" ) ) { subscript = subscript . substring ( 0 , subscript . length ( ) - 1 ) ; } } add... | Adds a parameter to the request . |
15,898 | public void write ( DataOutputStream stream , byte sequenceId ) throws IOException { this . sequenceId = sequenceId ; stream . write ( PREAMBLE ) ; stream . write ( sequenceId ) ; stream . write ( action . getCode ( ) ) ; stream . write ( buffer . toArray ( ) ) ; stream . write ( Constants . EOD ) ; } | Write request components to output stream . |
15,899 | public static final < T extends Recyclable > T get ( Class < T > cls ) { return get ( cls , null ) ; } | Returns new or recycled uninitialized object . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.