idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
9,700 | public static void bind ( final Context _ctx , final String _nameStr , final Object _object ) throws NamingException { final Name names = _ctx . getNameParser ( "" ) . parse ( _nameStr ) ; if ( names . size ( ) > 0 ) { Context subCtx = _ctx ; for ( int idx = 0 ; idx < names . size ( ) - 1 ; idx ++ ) { final String name... | Bing given object at the given name path within given name context . |
9,701 | protected Session getSession ( ) throws EFapsException { if ( this . session == null ) { try { String username = getProperties ( ) . get ( JCRStoreResource . PROPERTY_USERNAME ) ; if ( username == null ) { username = Context . getThreadContext ( ) . getPerson ( ) . getName ( ) ; } String passwd = getProperties ( ) . ge... | Gets the session for JCR access . |
9,702 | protected Node getFolderNode ( ) throws EFapsException , RepositoryException { Node ret = getSession ( ) . getRootNode ( ) ; if ( getProperties ( ) . containsKey ( JCRStoreResource . PROPERTY_BASEFOLDER ) ) { if ( ret . hasNode ( getProperties ( ) . get ( JCRStoreResource . PROPERTY_BASEFOLDER ) ) ) { ret = ret . getNo... | Gets the folder node . |
9,703 | protected Binary getBinary ( final InputStream _in ) throws EFapsException { Binary ret = null ; try { ret = SerialValueFactory . getInstance ( ) . createBinary ( _in ) ; } catch ( final RepositoryException e ) { throw new EFapsException ( "RepositoryException" , e ) ; } return ret ; } | Gets the binary . |
9,704 | protected void setIdentifer ( final String _identifier ) throws EFapsException { if ( ! _identifier . equals ( this . identifier ) ) { ConnectionResource res = null ; try { res = Context . getThreadContext ( ) . getConnectionResource ( ) ; final StringBuffer cmd = new StringBuffer ( ) . append ( "update " ) . append ( ... | Set the identifier in the eFaps DataBase . |
9,705 | public void rollback ( final Xid _xid ) throws XAException { try { getSession ( ) . logout ( ) ; } catch ( final EFapsException e ) { throw new XAException ( "EFapsException" ) ; } } | On rollback no save is send to the session .. |
9,706 | public final void initialize ( final Subject _subject , final CallbackHandler _callbackHandler , final Map < String , ? > _sharedState , final Map < String , ? > _options ) { XMLUserLoginModule . LOG . debug ( "Init" ) ; this . subject = _subject ; this . callbackHandler = _callbackHandler ; readPersons ( ( String ) _o... | Initialize this LoginModule . |
9,707 | @ SuppressWarnings ( "unchecked" ) private void readPersons ( final String _fileName ) { try { final File file = new File ( _fileName ) ; final Digester digester = new Digester ( ) ; digester . setValidating ( false ) ; digester . addObjectCreate ( "persons" , ArrayList . class ) ; digester . addObjectCreate ( "persons... | The name of the XML is store in this instance variable . The XML file holds all allowed persons and their related roles and groups . |
9,708 | private static boolean getAccessSetFromDB ( final String _sql , final Object _criteria ) throws CacheReloadException { boolean ret = false ; Connection con = null ; try { AccessSet accessSet = null ; con = Context . getConnection ( ) ; PreparedStatement stmt = null ; try { stmt = con . prepareStatement ( _sql ) ; stmt ... | Read the AccessSet from the DataBase . |
9,709 | public Table cloneTable ( ) { Table ret = null ; try { ret = ( Table ) super . clone ( ) ; } catch ( final CloneNotSupportedException e ) { e . printStackTrace ( ) ; } return ret ; } | Creates and returns a copy of this table object . |
9,710 | public void setIndex ( boolean b ) { if ( b ) { assert safe == null ; safe = type ; type = Typ . Int ; } else { assert type . getKind ( ) == TypeKind . INT ; assert safe != null ; type = safe ; safe = null ; } } | Set index parsing mode . In true mode we are parsing inside bracket where index type must be int . |
9,711 | public boolean hasEntries ( ) { return ( getCache4Id ( ) != null && ! getCache4Id ( ) . isEmpty ( ) ) || ( getCache4Name ( ) != null && ! getCache4Name ( ) . isEmpty ( ) ) || ( getCache4UUID ( ) != null && ! getCache4UUID ( ) . isEmpty ( ) ) ; } | The method tests if the cache has stored some entries . |
9,712 | public void initialize ( final Class < ? > _initializer ) { this . initializer = _initializer . getName ( ) ; synchronized ( this ) { try { readCache ( ) ; } catch ( final CacheReloadException e ) { AbstractCache . LOG . error ( "Unexpected error while initializing Cache for " + getClass ( ) , e ) ; } } } | The method initialize the cache . |
9,713 | public void clear ( ) { if ( getCache4Id ( ) != null ) { getCache4Id ( ) . clear ( ) ; } if ( getCache4Name ( ) != null ) { getCache4Name ( ) . clear ( ) ; } if ( getCache4UUID ( ) != null ) { getCache4UUID ( ) . clear ( ) ; } } | Clear all values of this Cache . |
9,714 | public static void clearCaches ( ) { synchronized ( AbstractCache . CACHES ) { for ( final AbstractCache < ? > cache : AbstractCache . CACHES ) { cache . getCache4Id ( ) . clear ( ) ; cache . getCache4Name ( ) . clear ( ) ; cache . getCache4UUID ( ) . clear ( ) ; } } } | The static method removes all values in all caches . |
9,715 | public void registerPropertyMatcher ( PropertyMatcher < ? > propertyMatcher ) { if ( propertyMatcher . getPathProvider ( ) == null ) { propertyMatcher . setPathProvider ( this ) ; } propertyMatcherList . add ( propertyMatcher ) ; } | Register a PropertyMatcher instance . Registered property matchers are used to generate the describeTo text . If a given property matcher does not have an assigned path provider this instance will be assigned . |
9,716 | public Add add ( long projectId , String deviceId , String deviceName , String deviceType , Date created ) { return add ( projectId , new Device . Spec ( deviceId , deviceName , deviceType ) , created ) ; } | Creates an Add API request for a new Device with the provided data . |
9,717 | public final boolean abort ( ) { boolean ret = false ; if ( UserLoginModule . LOG . isDebugEnabled ( ) ) { UserLoginModule . LOG . debug ( "Abort of " + this . principal ) ; } if ( this . principal != null ) { if ( this . committed ) { this . subject . getPrincipals ( ) . remove ( this . principal ) ; } this . committe... | Abort the login . |
9,718 | public void readXML ( final List < String > _tags , final Map < String , String > _attributes , final String _text ) throws SAXException , EFapsException { if ( _tags . size ( ) == 1 ) { final String value = _tags . get ( 0 ) ; if ( "uuid" . equals ( value ) ) { this . uuid = _text ; } else if ( "file-application" . eq... | Read event for given tags path with attributes and text . |
9,719 | protected void registerRevision ( final String _application , final InstallFile _installFile , final Instance _objInst ) throws InstallationException { try { if ( CIAdminCommon . Application . getType ( ) != null && CIAdminCommon . Application . getType ( ) . getAttributes ( ) . size ( ) > 4 ) { final QueryBuilder appQ... | Register revision . |
9,720 | public static BlogConnection getBlogConnection ( final String type , final String url , final String username , final String password ) throws BlogClientException { BlogConnection blogConnection = null ; if ( type == null || type . equals ( "metaweblog" ) ) { blogConnection = createBlogConnection ( METAWEBLOG_IMPL_CLAS... | Create a connection to a blog server . |
9,721 | @ SuppressWarnings ( "unchecked" ) public < G > OrFuture < G , BAD > future ( CheckedFunction0 < ? extends Or < ? extends G , ? extends BAD > > task ) { OrFutureImpl < G , BAD > future = new OrFutureImpl < > ( this ) ; executor . execute ( ( ) -> { try { future . complete ( ( Or < G , BAD > ) task . apply ( ) ) ; } cat... | Creates an OrFuture that will execute the given task using this context s executor . |
9,722 | public final < G , ERR > OrFuture < G , Every < ERR > > when ( OrFuture < ? extends G , ? extends Every < ? extends ERR > > or , Function < ? super G , ? extends Validation < ERR > > ... validations ) { OrPromise < G , Every < ERR > > promise = promise ( ) ; or . onComplete ( o -> promise . complete ( Accumulation . wh... | Enables further validation on an existing accumulating OrFuture by passing validation functions . |
9,723 | public < A , B , ERR , RESULT > OrFuture < RESULT , Every < ERR > > withGood ( OrFuture < ? extends A , ? extends Every < ? extends ERR > > fa , OrFuture < ? extends B , ? extends Every < ? extends ERR > > fb , BiFunction < ? super A , ? super B , ? extends RESULT > function ) { return withPromise ( this , promise -> f... | Combines two accumulating OrFutures into a single one using the given function . The resulting OrFuture will complete with a Good if both OrFutures complete with Goods otherwise it will complete with a Bad containing every error in the Bads . |
9,724 | public < G , ERR > OrFuture < G , ERR > firstCompletedOf ( Iterable < ? extends OrFuture < ? extends G , ? extends ERR > > input ) { OrPromise < G , ERR > promise = promise ( ) ; input . forEach ( future -> future . onComplete ( promise :: tryComplete ) ) ; return promise . future ( ) ; } | Returns an OrFuture that will complete as soon as the first OrFuture from the given Iterable completes . |
9,725 | public < A , B , ERR > OrFuture < Tuple2 < A , B > , Every < ERR > > zip ( OrFuture < ? extends A , ? extends Every < ? extends ERR > > a , OrFuture < ? extends B , ? extends Every < ? extends ERR > > b ) { return withGood ( a , b , Tuple :: of ) ; } | Zips two accumulating OrFutures together . If both complete with Goods returns an OrFuture that completes with a Good tuple containing both original Good values . Otherwise returns an OrFuture that completes with a Bad containing every error message . |
9,726 | public < A , B , C , ERR > OrFuture < Tuple3 < A , B , C > , Every < ERR > > zip3 ( OrFuture < ? extends A , ? extends Every < ? extends ERR > > a , OrFuture < ? extends B , ? extends Every < ? extends ERR > > b , OrFuture < ? extends C , ? extends Every < ? extends ERR > > c ) { return withGood ( a , b , c , Tuple :: ... | Zips three accumulating OrFutures together . If all complete with Goods returns an OrFuture that completes with a Good tuple containing all original Good values . Otherwise returns an OrFuture that completes with a Bad containing every error message . |
9,727 | public long getNewId ( final ConnectionResource _con , final String _table , final String _column ) throws SQLException { throw new SQLException ( "The database driver uses auto generated keys and " + "a new id could not returned without making " + "a new insert." ) ; } | This method normally returns for given table and column a new id . Because this database driver support auto generated keys an SQL exception is always thrown . |
9,728 | public void execute ( final OutputStream _out ) throws EFapsException { final boolean hasAccess = super . getInstance ( ) . getType ( ) . hasAccess ( super . getInstance ( ) , AccessTypeEnums . CHECKOUT . getAccessType ( ) ) ; if ( ! hasAccess ) { throw new EFapsException ( this . getClass ( ) , "execute.NoAccess" ) ; ... | Executes the checkout with an output stream . |
9,729 | public void executeWithoutTrigger ( final OutputStream _out ) throws EFapsException { Resource storeRsrc = null ; try { storeRsrc = Context . getThreadContext ( ) . getStoreResource ( getInstance ( ) , Resource . StoreEvent . READ ) ; storeRsrc . read ( _out ) ; this . fileLength = storeRsrc . getFileLength ( ) ; this ... | Executes the checkout for output streams without checking the access rights and without triggers . |
9,730 | public static Timestamp getCurrentTimeFromDB ( ) throws EFapsException { Timestamp now = null ; final ConnectionResource rsrc = Context . getThreadContext ( ) . getConnectionResource ( ) ; final Statement stmt ; try { stmt = rsrc . createStatement ( ) ; final ResultSet resultset = stmt . executeQuery ( "SELECT " + Cont... | Static method to get the current time stamp from the eFaps database . |
9,731 | void start ( long currentTime ) { this . readyTime = currentTime ; this . startTime = this . readyTime + this . delayTime ; this . endTime = this . startTime + getDuration ( ) ; this . status = TweenAnimationStatus . RUNNING ; } | Starts and Restart the interpolation . Using this method can lead to some side - effects if you call it multiple times . |
9,732 | final void render ( long currentTime ) { if ( this . getStatus ( ) != TweenAnimationStatus . RUNNING ) { return ; } if ( currentTime >= endTime && this . getStatus ( ) != TweenAnimationStatus . WAIT ) { this . status = TweenAnimationStatus . WAIT ; return ; } value = equation . compute ( currentTime - startTime , getSt... | Updates the tween state . Using this method can be unsafe if tween pooling was first enabled . |
9,733 | public BlogEntry next ( ) { try { final ClientEntry entry = iterator . next ( ) ; if ( entry instanceof ClientMediaEntry ) { return new AtomResource ( collection , ( ClientMediaEntry ) entry ) ; } else { return new AtomEntry ( collection , entry ) ; } } catch ( final Exception e ) { LOG . error ( "An error occured whil... | Get next entry . |
9,734 | public String getPhraseValue ( final Instance _instance ) throws EFapsException { final StringBuilder buf = new StringBuilder ( ) ; boolean added = false ; for ( final Token token : this . valueList . getTokens ( ) ) { switch ( token . getType ( ) ) { case EXPRESSION : final OneSelect oneselect = this . selectStmt2OneS... | Method to get the parsed value for this phrase . |
9,735 | public static void index ( ) throws EFapsException { final List < IndexDefinition > defs = IndexDefinition . get ( ) ; for ( final IndexDefinition def : defs ) { final QueryBuilder queryBldr = new QueryBuilder ( def . getUUID ( ) ) ; final InstanceQuery query = queryBldr . getQuery ( ) ; index ( query . execute ( ) ) ;... | Index or reindex using the Indexdefinitions . |
9,736 | public static boolean VerifyStrings ( String signature , String message , String publicKey ) throws LRException { if ( signature == null || message == null || publicKey == null ) { throw new LRException ( LRException . NULL_FIELD ) ; } InputStream isSignature = null ; InputStream isMessage = null ; InputStream isPublic... | Converts input strings to input streams for the main verify function |
9,737 | private static boolean Verify ( InputStream isSignature , InputStream isMessage , InputStream isPublicKey ) throws LRException { PGPPublicKeyRingCollection pgpRings = null ; try { pgpRings = new PGPPublicKeyRingCollection ( PGPUtil . getDecoderStream ( isPublicKey ) ) ; } catch ( Exception e ) { throw new LRException (... | Verfies that the provided message and signature using the public key |
9,738 | public void setGlobalScopes ( Iterable < GlobalScope > globalScopes ) { this . globalScopes = Lists . newArrayList ( Iterables . concat ( globalScopes , serviceGlobalScopes ) ) ; } | Sets the active global scopes |
9,739 | public void render ( String path , Map < String , Object > parameters , Writer out , GlobalScope ... extraGlobalScopes ) throws IOException , ParseException { render ( load ( path ) , parameters , out ) ; } | Renders template loaded from the given path with provided parameters to the given character stream . |
9,740 | public void renderInline ( String text , Map < String , Object > parameters , Writer out , GlobalScope ... extraGlobalScopes ) throws IOException , ParseException { render ( loadInline ( text ) , parameters , out , extraGlobalScopes ) ; } | Renders given text with the provided parameters to the given character stream . |
9,741 | public void render ( Template template , Map < String , Object > parameters , Writer out , GlobalScope ... extraGlobalScopes ) throws IOException { newInterpreter ( extraGlobalScopes ) . declare ( parameters ) . process ( ( TemplateImpl ) template , out ) ; } | Renders given template with provided parameters to the given character stream . |
9,742 | public void render ( Template template , Writer out , GlobalScope ... extraGlobalScopes ) throws IOException { newInterpreter ( extraGlobalScopes ) . process ( ( TemplateImpl ) template , out ) ; } | Renders given template to the given character stream . |
9,743 | public String render ( Template template , Map < String , Object > parameters , GlobalScope ... extraGlobalScopes ) throws IOException { StringWriter out = new StringWriter ( ) ; render ( template , parameters , out , extraGlobalScopes ) ; return out . toString ( ) ; } | Renders given template with the provided parameters and returns the rendered text . |
9,744 | public String render ( String path , GlobalScope ... extraGlobalScopes ) throws IOException , ParseException { return render ( load ( path ) , extraGlobalScopes ) ; } | Renders template loaded from path and returns rendered text . |
9,745 | public String renderInline ( String text , GlobalScope ... extraGlobalScopes ) throws IOException , ParseException { return render ( loadInline ( text ) , extraGlobalScopes ) ; } | Renders given text and returns rendered text . |
9,746 | public String render ( Template template , GlobalScope ... extraGlobalScopes ) throws IOException { StringWriter out = new StringWriter ( ) ; render ( template , out , extraGlobalScopes ) ; return out . toString ( ) ; } | Renders given template and returns rendered text . |
9,747 | public Template loadInline ( String text ) throws IOException , ParseException { try ( InlineTemplateSource templateSource = new InlineTemplateSource ( text ) ) { return load ( "inline" , templateSource ) ; } } | Loads the given text as a template |
9,748 | public Template load ( String path ) throws IOException , ParseException { try ( TemplateSource source = sourceLoader . find ( path ) ) { if ( source != null ) { return load ( path , source ) ; } } return null ; } | Loads a template from the given path |
9,749 | public boolean next ( ) throws EFapsException { boolean ret = false ; if ( this . iterator == null ) { this . iterator = this . instances . iterator ( ) ; } if ( this . iterator . hasNext ( ) ) { this . current = this . iterator . next ( ) ; ret = true ; } if ( ret ) { for ( final OneSelect oneSelect : getAllSelects ( ... | Method to move the iterator to the next value . |
9,750 | protected Object executeEvents ( final EventType _eventType , final TargetMode _targetMode ) throws EFapsException { Object ret = null ; if ( this . fieldId > 0 && getField ( ) . hasEvents ( _eventType ) ) { final List < EventDefinition > events = getField ( ) . getEvents ( _eventType ) ; final StringBuilder html = new... | Executes the field value events for a field . |
9,751 | public void setPosition ( double x , double y , double z ) { this . x = x ; this . y = y ; this . z = z ; } | Sets the position of the Element in 3D . |
9,752 | public void setPosition ( Vector3D v ) { this . x = v . getX ( ) ; this . y = v . getY ( ) ; this . z = v . getZ ( ) ; } | Sets the position of the Element in 2D . |
9,753 | public void setRotation ( double angle , double x , double y , double z ) { this . rotateX = angle * x ; this . rotateY = angle * y ; this . rotate = angle * z ; } | Sets the rotation angle of the Element . This method wraps the glRotate method . |
9,754 | public void setScale ( double scaleX , double scaleY , double scaleZ ) { this . scaleX = scaleX ; this . scaleY = scaleY ; this . scaleZ = scaleZ ; } | Sets the scale of the Element |
9,755 | public void addMouseEventCallback ( MouseEventCallback callback ) { if ( mouseEventCallbacks == null ) { mouseEventCallbacks = new ArrayList < MouseEventCallback > ( ) ; } mouseEventCallbacks . add ( callback ) ; } | Add a mouse event callback to a element |
9,756 | @ SuppressWarnings ( "unchecked" ) protected Result < JsonNode > writeDataWithResult ( final ObjectNode message , final ObjectMapper objectMapper ) { Result < JsonNode > result ; byte [ ] binaryResultMessage = null ; String textResultMessage = null ; try { if ( ThreadBinary . isBinary ( ) ) { binaryResultMessage = data... | Sends a write message to a Neo4j cluster and returns the data server s answer . |
9,757 | public void addSyntheticRule ( ExecutableElement reducer , String nonterminal , String ... rhs ) { addRule ( reducer , nonterminal , "" , true , Arrays . asList ( rhs ) ) ; } | Adds new rule if the same rule doesn t exist already . Rhs is added as - is . Sequences choices or quantifiers are not parsed . |
9,758 | public void addAnonymousTerminal ( String expression , Option ... options ) { addTerminal ( null , "'" + expression + "'" , expression , "" , 0 , 10 , options ) ; } | Adds anonymous terminal . Anonymous terminals name is expression |
9,759 | public LALRKParserGenerator getParserGenerator ( ParseMethod parseMethod ) { Grammar g = new Grammar ( parseMethod . start ( ) , this , parseMethod . eof ( ) , parseMethod . whiteSpace ( ) ) ; try { return g . createParserGenerator ( parseMethod . start ( ) , ParserFeature . get ( parseMethod ) ) ; } catch ( Throwable ... | Return a parser generator from grammar . The same grammar can produce different parsers depending for example on start rhs . |
9,760 | public void add ( CharRange cond ) { if ( set . isEmpty ( ) ) { set . add ( cond ) ; } else { List < CharRange > remlist = new ArrayList < CharRange > ( ) ; List < CharRange > addlist = new ArrayList < CharRange > ( ) ; boolean is = false ; for ( CharRange r : set ) { if ( r . intersect ( cond ) ) { remlist . add ( r )... | Adds a CharRange |
9,761 | public static RangeSet split ( Collection < RangeSet > rangeSets ) { RangeSet result = new RangeSet ( ) ; SortedSet < Integer > ss = new TreeSet < Integer > ( ) ; for ( RangeSet rs : rangeSets ) { for ( CharRange r : rs ) { ss . add ( r . getFrom ( ) ) ; ss . add ( r . getTo ( ) ) ; } } Iterator < Integer > i = ss . it... | Converts a possibly overlapping collection of RangesSet s into a non overlapping RangeSet that accepts the same characters . |
9,762 | public boolean isIntersecting ( Collection < RangeSet > rangeSets ) { for ( RangeSet rs : rangeSets ) { for ( CharRange r1 : rs ) { for ( CharRange r2 : this ) { if ( r1 . intersect ( r2 ) ) { return true ; } } } } return false ; } | Returns true only if any two of RangeSet s is intersecting with each other . |
9,763 | public static RangeSet merge ( RangeSet rs ) { RangeSet result = new RangeSet ( ) ; int from = - 1 ; int to = - 1 ; for ( CharRange r : rs ) { if ( from == - 1 ) { from = r . getFrom ( ) ; to = r . getTo ( ) ; } else { if ( r . getFrom ( ) == to ) { to = r . getTo ( ) ; } else { result . add ( from , to ) ; from = r . ... | Returns a new RangeSet that accepts the same characters as argument . Ranges that are followinf each other are concatenated . |
9,764 | public RangeSet complement ( ) { SortedSet < CharRange > nset = new TreeSet < CharRange > ( ) ; int from = 0 ; for ( CharRange r : set ) { int to = r . getFrom ( ) ; if ( from < to ) { nset . add ( new CharRange ( from , to ) ) ; } from = r . getTo ( ) ; } if ( from < Integer . MAX_VALUE ) { nset . add ( new CharRange ... | Return a complement RangeSet . In other words a RangeSet doesn t accept any of this rangesets characters and accepts all other characters . |
9,765 | public TableIdx getTableIdx ( final String _tableName , final String ... _keys ) { TableIdx ret = null ; final String key = _tableName + "-" + StringUtils . join ( _keys , "-" ) ; final Optional < TableIdx > val = this . tableidxs . stream ( ) . filter ( t -> t . getKey ( ) . equals ( key ) ) . findFirst ( ) ; if ( val... | Gets the table idx . |
9,766 | public static void compileAll ( final List < String > _classPathElements ) throws EFapsException { new JasperReportCompiler ( _classPathElements ) . compile ( ) ; new CSSCompiler ( ) . compile ( ) ; new JavaScriptCompiler ( ) . compile ( ) ; new WikiCompiler ( ) . compile ( ) ; } | Static Method that executes the method compile for the SubClasses CSSCompiler and JavaScriptCompiler . |
9,767 | protected Map < String , String > readCompiledSources ( ) throws EFapsException { final Map < String , String > ret = new HashMap < > ( ) ; final QueryBuilder queryBldr = new QueryBuilder ( getClassName4TypeCompiled ( ) ) ; final MultiPrintQuery multi = queryBldr . getPrint ( ) ; multi . addAttribute ( CIAdminProgram .... | This method reads all compiled Sources from the eFaps - DataBase and returns a map with name to oid relation . |
9,768 | protected List < T > readSources ( ) throws EFapsException { final List < T > ret = new ArrayList < > ( ) ; final QueryBuilder queryBldr = new QueryBuilder ( getClassName4Type ( ) ) ; final MultiPrintQuery multi = queryBldr . getPrint ( ) ; multi . addAttribute ( CIAdminProgram . Abstract . Name ) ; multi . executeWith... | This method reads all Sources from the eFapsDataBase and returns for each Source a Instance of AbstractSource in a List . |
9,769 | protected List < Instance > getSuper ( final Instance _instance ) throws EFapsException { final List < Instance > ret = new ArrayList < > ( ) ; final QueryBuilder queryBldr = new QueryBuilder ( getClassName4Type2Type ( ) ) ; queryBldr . addWhereAttrEqValue ( CIAdminProgram . Program2Program . From , _instance . getId (... | Recursive method that searches the SuperSource for the current Instance identified by the oid . |
9,770 | public static String getSourceByClass ( Class < ? > koanClass ) { File file = new File ( getKoanFileLocation ( koanClass ) ) ; StringBuilder contents = new StringBuilder ( ) ; BufferedReader reader = null ; try { reader = new BufferedReader ( new FileReader ( file ) ) ; String text = null ; while ( ( text = reader . re... | Gets source for a class . |
9,771 | public static FileInputStream getInputStreamByClass ( Class < ? > koanClass ) { FileInputStream in = null ; try { in = new FileInputStream ( getKoanFileLocation ( koanClass ) ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } return in ; } | Gets an input stream by class . |
9,772 | public static String getSolutionFromFile ( Class < ? > koanClass , String methodName ) { return getSourceFromFile ( koanClass , methodName , SOLUTION_EXTENSION ) ; } | Gets solution for a koan by method name . |
9,773 | public static String getProblemFromFile ( Class < ? > koanClass , String methodName ) { return getSourceFromFile ( koanClass , methodName , PROBLEM_EXTENSION ) ; } | Gets problem for a koan by method name . |
9,774 | public Instance updateInDB ( final Instance _instance , final String _typeName ) { Instance ret = null ; try { final long typeID = _instance . getId ( ) ; final long progID = getProgID ( _typeName ) ; final QueryBuilder queryBldr = new QueryBuilder ( Type . get ( this . event . getName ( ) ) ) ; queryBldr . addWhereAtt... | For given type defined with the instance parameter this trigger is searched by typeID and index position . If the trigger exists the trigger is updated . Otherwise the trigger is created . |
9,775 | private long getProgID ( final String _typeName ) throws EFapsException { long id = 0 ; final QueryBuilder queryBldr = new QueryBuilder ( CIAdminProgram . Java ) ; queryBldr . addWhereAttrEqValue ( CIAdminProgram . Java . Name , this . program ) ; final InstanceQuery query = queryBldr . getQuery ( ) ; query . executeWi... | Get the id of the program . |
9,776 | public void addPropertiesOverwrite ( final String _sytemConfig , final String _attribute ) { this . properties . put ( Overwrite . SYSTEMCONFIG . value ( ) , _sytemConfig ) ; this . properties . put ( Overwrite . ATTRIBUTE . value ( ) , _attribute ) ; } | Adds the properties overwrite . |
9,777 | public String getMessage ( ) { if ( code == NO_DATA ) return "A document cannot be added without resource data." ; else if ( code == NO_LOCATOR ) return "A document cannot be added without a resource locator." ; else if ( code == INVALID_JSON ) return "The provided JSON could not be compiled. Check that the JSON provid... | Get the message attached to the exception |
9,778 | public void resetDatabase ( ) { String dropOrphanedEvents = "DROP TABLE IF EXISTS " + DbOrphanedEvent . TABLE_NAME ; SQLiteDatabase writable = dbHelper . getWritableDatabase ( ) ; writable . beginTransaction ( ) ; try { writable . execSQL ( dropOrphanedEvents ) ; writable . execSQL ( DatabaseHelper . SQL_CREATE_ORPHANE... | Recreates empty database . |
9,779 | @ SuppressWarnings ( "unchecked" ) private < T > List < WatcherRegistration < T > > getWatcherRegistrations ( Id < T > id ) { return ( List < WatcherRegistration < T > > ) ( ( Container ) watcherRegistry ) . getAll ( id . type ( ) ) ; } | returns all the watchers associated to the type of the given id . |
9,780 | public Integer getIndex4SqlTable ( final SQLTable _sqlTable ) { final Integer ret ; if ( this . sqlTable2Index . containsKey ( _sqlTable ) ) { ret = this . sqlTable2Index . get ( _sqlTable ) ; } else { Integer max = 0 ; for ( final Integer index : this . sqlTable2Index . values ( ) ) { if ( index > max ) { max = index ... | Get the index for a SQLTable if the table is not existing the table is added and a new index given . |
9,781 | public boolean next ( ) { if ( this . iter == null ) { this . iter = new ArrayList < > ( this . values ) . iterator ( ) ; } final boolean ret = this . iter . hasNext ( ) ; if ( ret ) { this . current = this . iter . next ( ) ; } return ret ; } | Move the current instance to the next instance in the list . |
9,782 | public URL findResource ( final String _name ) { URL ret = null ; final String name = _name . replaceAll ( System . getProperty ( "file.separator" ) , "." ) . replaceAll ( ".class" , "" ) ; final byte [ ] data = loadClassData ( name ) ; if ( data != null && data . length > 0 ) { final File file = FileUtils . getFile ( ... | In case of jbpm this is necessary for compiling because they search the classes with URL . |
9,783 | protected byte [ ] loadClassData ( final String _resourceName ) { EFapsClassLoader . LOG . debug ( "Loading Class '{}' from Database." , _resourceName ) ; final byte [ ] x = read ( _resourceName ) ; return x ; } | Loads the wanted Resource with the EFapsResourceStore into a byte - Array to pass it on to findClass . |
9,784 | void sendTaskListToChannels ( List < TaskRec > tasks ) { Map < String , List < TaskRec > > grouped = new HashMap < String , List < TaskRec > > ( ) ; for ( TaskRec taskRec : tasks ) { List < TaskRec > tlist = grouped . get ( taskRec . name ) ; if ( tlist == null ) { tlist = new ArrayList < TaskRec > ( ) ; grouped . put ... | will send task to their channels for execution |
9,785 | void handleUnknownTasks ( List < TaskRec > taskRecList ) { long nowMs = System . currentTimeMillis ( ) ; for ( TaskRec taskRec : taskRecList ) { if ( taskRec . createTs . getTime ( ) < nowMs - UNKNOWN_TASK_CANCEL_AFTER_MS ) { logger . warn ( "Task is unknown and was not processed during 24 hours, mark as error: {}" , t... | can be called from eventQueue also |
9,786 | private void calcChannelsStats ( List < TaskRec > tasks ) { for ( ChannelWorkContext wc : channelContextMap . values ( ) ) { wc . lastGotCount = 0 ; } for ( TaskRec taskRec : tasks ) { ChannelWorkContext wc = channelContextMap . get ( taskRec . channel ) ; if ( wc == null ) { wc = new ChannelWorkContext ( taskRec . cha... | refresh channels work info . is not thread safe |
9,787 | public void makeTheProductOfIAndJ ( ) { int i = 10 ; int j = 5 ; int product = 0 ; product = i * j ; assertThat ( product , is ( 50 ) ) ; } | In this exercise students will learn how to use the multiplication operator in Java |
9,788 | public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop ( ) { int seventhFibonacciNumber = 0 ; int previous1 = 1 ; int previous2 = 1 ; int currentFibonacci = 1 ; for ( int i = 3 ; i <= 7 ; i ++ ) { } seventhFibonacciNumber = currentFibonacci ; assertThat ( seventhFibonacciNumber , is ( 13 ) ) ; } | In this exercise students will learn how to use |
9,789 | @ Action ( ) public SomeNotAuditedObject updateNameAndNumber ( @ ParameterLayout ( named = "Name" ) final String name , @ Parameter ( optionality = Optionality . OPTIONAL ) @ ParameterLayout ( named = "Number" ) final Integer number ) { setName ( name ) ; setNumber ( number ) ; return this ; } | region > updateNameAndNumber |
9,790 | public void setCorner ( int index , double x , double y ) { if ( index <= 0 ) { this . x1 = x ; this . y1 = y ; } else if ( index == 1 ) { this . x2 = x ; this . y2 = y ; } else if ( index == 2 ) { this . x3 = x ; this . y3 = y ; } else if ( index >= 3 ) { this . x4 = x ; this . y4 = y ; } calcG ( ) ; } | Sets x y - coordinate of a corner . |
9,791 | public void setConer ( int index , Vector3D v ) { if ( index <= 0 ) { this . x1 = v . getX ( ) ; this . y1 = v . getY ( ) ; } else if ( index == 1 ) { this . x2 = v . getX ( ) ; this . y2 = v . getY ( ) ; } else if ( index == 2 ) { this . x3 = v . getX ( ) ; this . y3 = v . getY ( ) ; } else if ( 3 <= index ) { this . ... | Sets coordinates of a corner . |
9,792 | public Vector3D getConer ( int index ) { Vector3D v = new Vector3D ( 0 , 0 , 0 ) ; if ( index <= 0 ) { v . set ( this . x1 , this . y1 ) ; } else if ( index == 1 ) { v . set ( this . x2 , this . y2 ) ; } else if ( index == 2 ) { v . set ( this . x3 , this . y3 ) ; } else if ( 3 <= index ) { v . set ( this . x4 , this .... | Gets coordinates of a corner . |
9,793 | public void setCornerColor ( int index , Color color ) { if ( ! isGradation ( ) ) { for ( int i = 0 ; i < 4 ; i ++ ) { cornerColor [ i ] = new RGBColor ( 0.0 , 0.0 , 0.0 ) ; cornerColor [ i ] = this . fillColor ; } setGradation ( true ) ; } cornerColor [ index ] = color ; } | Sets the color of a corner for gradation . |
9,794 | private AbstractQValue getValue ( final Object _value ) throws EFapsException { AbstractQValue ret = null ; if ( _value == null ) { ret = new QNullValue ( ) ; } else if ( _value instanceof Number ) { ret = new QNumberValue ( ( Number ) _value ) ; } else if ( _value instanceof String ) { ret = new QStringValue ( ( Strin... | Get the QAbstractValue for a value . |
9,795 | public AttributeQuery getAttributeQuery ( final String _attributeName ) { if ( this . query == null ) { try { final String attribute = getAttr4Select ( _attributeName ) ; this . query = new AttributeQuery ( this . typeUUID , attribute . isEmpty ( ) ? _attributeName : attribute ) . setCompanyDependent ( isCompanyDepende... | Method to get an Attribute Query . |
9,796 | protected AttributeQuery getAttributeQuery ( ) throws EFapsException { AttributeQuery ret = this . getAttributeQuery ( getSelectAttributeName ( ) ) ; if ( ! this . attrQueryBldrs . isEmpty ( ) ) { final QueryBuilder queryBldr = this . attrQueryBldrs . values ( ) . iterator ( ) . next ( ) ; queryBldr . addWhereAttrInQue... | Method to get an Attribute Query in case of a Select where criteria . |
9,797 | private void prepareQuery ( ) throws EFapsException { for ( final QueryBuilder queryBldr : this . attrQueryBldrs . values ( ) ) { final AttributeQuery attrQuery = queryBldr . getAttributeQuery ( ) ; this . addWhereAttrInQuery ( queryBldr . getLinkAttributeName ( ) , attrQuery ) ; } if ( ! this . types . isEmpty ( ) ) {... | Prepare the Query . |
9,798 | public CachedMultiPrintQuery getCachedPrint ( final String _key ) throws EFapsException { return new CachedMultiPrintQuery ( getCachedQuery ( _key ) . execute ( ) , _key ) ; } | Method to get a CachedMultiPrintQuery . |
9,799 | public static AbstractQPart getQPart ( final AbstractWhere _where ) throws EFapsException { AbstractQPart ret = null ; if ( _where instanceof SelectWhere ) { switch ( _where . getComparison ( ) ) { case EQUAL : final QueryBuilder queryBldr = new QueryBuilder ( ( UUID ) null ) ; ret = queryBldr . addWhereSelectEqValue (... | Gets the q part . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.