idx int64 0 41.2k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
36,100 | private void setFieldValueViaCQL ( Object entity , Object thriftColumnValue , Attribute attribute ) { if ( attribute != null ) { try { if ( attribute . isCollection ( ) ) { setCollectionValue ( entity , thriftColumnValue , attribute ) ; } else if ( CassandraDataTranslator . isCassandraDataTypeClass ( ( ( AbstractAttrib... | Sets the field value via cql . |
36,101 | private Object setElementCollectionMap ( MapType mapType , ByteBuffer thriftColumnValue , Object entity , Field field , MetamodelImpl metaModel , Class embeddedClass , boolean useNativeProtocol2 ) { Map result = new HashMap ( ) ; MapSerializer mapSerializer = mapType . getSerializer ( ) ; Map outputCollection = new Has... | Sets the element collection map . |
36,102 | private Object setElementCollectionSet ( SetType setType , ByteBuffer thriftColumnValue , Object entity , Field field , MetamodelImpl metaModel , Class embeddedClass , boolean useNativeProtocol2 ) { SetSerializer setSerializer = setType . getSerializer ( ) ; Collection outputCollection = new ArrayList ( ) ; if ( useNat... | Sets the element collection set . |
36,103 | private Object setElementCollectionList ( ListType listType , ByteBuffer thriftColumnValue , Object entity , Field field , MetamodelImpl metaModel , Class embeddedClass , boolean useNativeProtocol2 ) { ListSerializer listSerializer = listType . getSerializer ( ) ; Collection outputCollection = new ArrayList ( ) ; if ( ... | Sets the element collection list . |
36,104 | private Object getFieldValueViaCQL ( Object thriftColumnValue , Attribute attribute ) { PropertyAccessor < ? > accessor = PropertyAccessorFactory . getPropertyAccessor ( ( Field ) attribute . getJavaMember ( ) ) ; Object objValue ; try { if ( CassandraDataTranslator . isCassandraDataTypeClass ( ( ( AbstractAttribute ) ... | Gets the field value via cql . |
36,105 | private Collection < ThriftRow > onColumnOrSuperColumnThriftRow ( EntityMetadata m , Object e , Object id , long timestamp , Object columnTTLs ) { Map < String , ThriftRow > thriftRows = new HashMap < String , ThriftRow > ( ) ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . g... | On column or super column thrift row . |
36,106 | private int getTTLForColumn ( Object columnTTLs , Attribute attribute ) { Integer ttl = null ; if ( columnTTLs != null ) { if ( columnTTLs instanceof Map ) { ttl = ( Integer ) ( columnTTLs == null ? 0 : ( ( Map ) columnTTLs ) . get ( ( ( AbstractAttribute ) attribute ) . getJPAColumnName ( ) ) ) ; } else if ( columnTTL... | Determined TTL for a given column . |
36,107 | protected byte [ ] getThriftColumnValue ( Object e , Attribute attribute ) { byte [ ] value = null ; Field field = ( Field ) ( ( Attribute ) attribute ) . getJavaMember ( ) ; try { if ( attribute != null && field . get ( e ) != null ) { if ( CassandraDataTranslator . isCassandraDataTypeClass ( ( ( AbstractAttribute ) a... | Gets the thrift column value . |
36,108 | private void prepareSuperColumn ( ThriftRow tr , EntityMetadata m , Object value , byte [ ] name , long timestamp ) { if ( value != null ) { if ( m . isCounterColumnType ( ) ) { CounterSuperColumn counterSuper = new CounterSuperColumn ( ) ; counterSuper . setName ( name ) ; CounterColumn counterColumn = prepareCounterC... | Prepare super column . |
36,109 | private CounterColumn prepareCounterColumn ( String value , byte [ ] name ) { CounterColumn counterColumn = new CounterColumn ( ) ; counterColumn . setName ( name ) ; LongAccessor accessor = new LongAccessor ( ) ; counterColumn . setValue ( accessor . fromString ( LongAccessor . class , value ) ) ; return counterColumn... | Prepare counter column . |
36,110 | private Map < String , Object > buildThriftCounterSuperColumn ( String tableName , String superColumnName , EmbeddableType superColumn , Object counterSuperColumnObject ) { Map < String , Object > thriftCounterSuperColumns = new HashMap < String , Object > ( ) ; Iterator < Attribute > iter = superColumn . getAttributes... | Builds the thrift counter super column . |
36,111 | private Object find ( Class entityClass , Object key , List < String > columnsToSelect ) { EntityMetadata entityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , entityClass ) ; MetamodelImpl metamodel = ( MetamodelImpl ) KunderaMetadataManager . getMetamodel ( kunderaMetadata , entityMetadata .... | Find by id . |
36,112 | private void readEmbeddable ( Object key , List < String > columnsToSelect , EntityMetadata entityMetadata , MetamodelImpl metamodel , Table schemaTable , RecordValue value , Attribute attribute ) { EmbeddableType embeddableId = metamodel . embeddable ( ( ( AbstractAttribute ) attribute ) . getBindableJavaType ( ) ) ; ... | Read embeddable . |
36,113 | public void delete ( Object entity , Object pKey ) { EntityMetadata entityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , entity . getClass ( ) ) ; MetamodelImpl metamodel = ( MetamodelImpl ) KunderaMetadataManager . getMetamodel ( kunderaMetadata , entityMetadata . getPersistenceUnit ( ) ) ; ... | Delete by primary key . |
36,114 | private void addOps ( Map < Key , List < TableOperation > > operations , Table schemaTable , Row row ) { Key key = ( ( TableImpl ) schemaTable ) . createKey ( row , false ) ; TableOperation ops = tableAPI . getTableOperationFactory ( ) . createPut ( row , Choice . NONE , true ) ; if ( operations . containsKey ( key ) )... | Adds the ops . |
36,115 | public < E > List < E > executeQuery ( Class < E > entityClass , OracleNoSQLQueryInterpreter interpreter , Set < Object > primaryKeys ) { EntityMetadata entityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , entityClass ) ; MetamodelImpl metamodel = ( MetamodelImpl ) KunderaMetadataManager . ge... | On JPQL query execution . |
36,116 | public List < Object > findByRelation ( String colName , Object colValue , Class entityClazz ) { EntityMetadata entityMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , entityClazz ) ; MetamodelImpl metamodel = ( MetamodelImpl ) KunderaMetadataManager . getMetamodel ( kunderaMetadata , entityMeta... | Find by relational column name and value . |
36,117 | private void process ( Object entity , MetamodelImpl metamodel , Row row , Set < Attribute > attributes , Table schemaTable , EntityMetadata metadata ) { for ( Attribute attribute : attributes ) { if ( ! attribute . isAssociation ( ) ) { if ( attribute . equals ( metadata . getIdAttribute ( ) ) && metamodel . isEmbedda... | Iterate and store attributes . |
36,118 | private void processEmbeddableAttribute ( Object entity , MetamodelImpl metamodel , Row row , Table schemaTable , EntityMetadata metadata , Attribute attribute ) { EmbeddableType embeddable = metamodel . embeddable ( ( ( AbstractAttribute ) attribute ) . getBindableJavaType ( ) ) ; Set < Attribute > embeddedAttributes ... | Process embeddable attribute . |
36,119 | private void onRelationalAttributes ( List < RelationHolder > rlHolders , Row row , Table schemaTable ) { if ( rlHolders != null && ! rlHolders . isEmpty ( ) ) { for ( RelationHolder rh : rlHolders ) { String relationName = rh . getRelationName ( ) ; Object valueObj = rh . getRelationValue ( ) ; if ( ! StringUtils . is... | Process relational attributes . |
36,120 | private void addDiscriminatorColumn ( Row row , EntityType entityType , Table schemaTable ) { String discrColumn = ( ( AbstractManagedType ) entityType ) . getDiscriminatorColumn ( ) ; String discrValue = ( ( AbstractManagedType ) entityType ) . getDiscriminatorValue ( ) ; if ( discrColumn != null && discrValue != null... | Process discriminator columns . |
36,121 | private void setField ( Row row , Table schemaTable , Object embeddedObject , Attribute embeddedAttrib ) { Field field = ( Field ) embeddedAttrib . getJavaMember ( ) ; FieldDef fieldDef = schemaTable . getField ( ( ( AbstractAttribute ) embeddedAttrib ) . getJPAColumnName ( ) ) ; Object valueObj = PropertyAccessorHelpe... | setter field . |
36,122 | private void populateId ( EntityMetadata entityMetadata , Table schemaTable , Object entity , Row row ) { FieldDef fieldMetadata ; FieldValue value ; String idColumnName = ( ( AbstractAttribute ) entityMetadata . getIdAttribute ( ) ) . getJPAColumnName ( ) ; fieldMetadata = schemaTable . getField ( idColumnName ) ; val... | Populate id . |
36,123 | private void onEmbeddableId ( EntityMetadata entityMetadata , MetamodelImpl metaModel , Table schemaTable , Object entity , Row row ) throws InstantiationException , IllegalAccessException { FieldDef fieldMetadata ; FieldValue value ; EmbeddableType embeddableType = metaModel . embeddable ( entityMetadata . getIdAttrib... | On embeddable id . |
36,124 | private Object initializeEntity ( Object key , EntityMetadata entityMetadata ) throws InstantiationException , IllegalAccessException { Object entity = null ; entity = entityMetadata . getEntityClazz ( ) . newInstance ( ) ; if ( key != null ) { PropertyAccessorHelper . setId ( entity , entityMetadata , key ) ; } return... | Initialize entity . |
36,125 | private < E > List < E > onIndexSearch ( OracleNoSQLQueryInterpreter interpreter , EntityMetadata entityMetadata , MetamodelImpl metamodel , List < E > results , List < String > columnsToSelect ) { Map < String , List > indexes = new HashMap < String , List > ( ) ; StringBuilder indexNamebuilder = new StringBuilder ( )... | On index search . |
36,126 | private Row createRow ( EntityMetadata entityMetadata , Object entity , Object id , List < RelationHolder > rlHolders ) { String schema = entityMetadata . getSchema ( ) ; String table = entityMetadata . getTableName ( ) ; MetamodelImpl metamodel = ( MetamodelImpl ) KunderaMetadataManager . getMetamodel ( kunderaMetadat... | Creates the row . |
36,127 | private boolean eligibleToFetch ( List < String > columnsToSelect , String columnName ) { return ( columnsToSelect != null && ! columnsToSelect . isEmpty ( ) && columnsToSelect . contains ( columnName ) ) || ( columnsToSelect == null || columnsToSelect . isEmpty ( ) ) ; } | Eligible to fetch . |
36,128 | List createAndExecuteQuery ( CouchDBQueryInterpreter interpreter ) { EntityMetadata m = interpreter . getMetadata ( ) ; List results = new ArrayList ( ) ; try { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; StringBuilder q = new ... | Creates the and execute query . |
36,129 | void executeQueryAndGetResults ( StringBuilder q , String _id , EntityMetadata m , List results , CouchDBQueryInterpreter interpreter ) throws IOException , URISyntaxException , ClientProtocolException { HttpResponse response = null ; try { response = getResponse ( q , _id ) ; JsonArray array = getJsonFromResponse ( re... | Execute query and get results . |
36,130 | private void setAggregatedValuesInResult ( List results , CouchDBQueryInterpreter interpreter , JsonArray array ) { for ( JsonElement json : array ) { JsonElement value = json . getAsJsonObject ( ) . get ( "value" ) ; if ( interpreter . getAggregationType ( ) . equals ( CouchDBConstants . COUNT ) ) results . add ( valu... | Sets the aggregated values in result . |
36,131 | private void setSpecificFieldsInResult ( List < Map < String , Object > > columnsToOutput , EntityMetadata m , List results , JsonArray array ) { Map < String , Class > colNameToJavaType = new HashMap < String , Class > ( ) ; for ( Map < String , Object > map : columnsToOutput ) { colNameToJavaType . put ( ( String ) m... | Sets the specific fields in result . |
36,132 | private void setEntitiesInResult ( EntityMetadata m , List results , JsonArray array ) { for ( JsonElement element : array ) { String id = element . getAsJsonObject ( ) . get ( "value" ) . getAsJsonObject ( ) . get ( ( ( AbstractAttribute ) m . getIdAttribute ( ) ) . getJPAColumnName ( ) ) . getAsString ( ) ; Object en... | Sets the entities in result . |
36,133 | private JsonArray getJsonFromResponse ( HttpResponse response ) throws IOException { InputStream content = response . getEntity ( ) . getContent ( ) ; Reader reader = new InputStreamReader ( content ) ; JsonObject json = gson . fromJson ( reader , JsonObject . class ) ; JsonElement jsonElement = json . get ( "rows" ) ;... | Gets the json from response . |
36,134 | public static synchronized LuceneIndexer getInstance ( String lucDirPath ) { if ( indexer == null && lucDirPath != null ) { indexer = new LuceneIndexer ( lucDirPath ) ; } return indexer ; } | Gets the single instance of LuceneIndexer . |
36,135 | private IndexReader getIndexReader ( ) { if ( reader == null ) { try { if ( ! isInitialized ) { Directory sourceDir = FSDirectory . open ( getIndexDirectory ( ) . toPath ( ) ) ; copy ( sourceDir , index ) ; isInitialized = true ; } reader = DirectoryReader . open ( index ) ; } catch ( IndexNotFoundException infex ) { l... | Returns default index reader . |
36,136 | private File getIndexDirectory ( ) { File file = new File ( luceneDirPath ) ; if ( ! file . isDirectory ( ) ) { file . mkdir ( ) ; } return file ; } | Creates a Lucene index directory if it does not exist . |
36,137 | public void prepareEmbeddedId ( TopDocs docs , Map < String , Object > indexCol , IndexSearcher searcher , EntityMetadata metadata , MetamodelImpl metaModel ) { try { for ( ScoreDoc sc : docs . scoreDocs ) { Document doc = searcher . doc ( sc . doc ) ; Map < String , Object > embeddedIdFields = new HashMap < String , O... | search the data from lucene for embeddedid |
36,138 | private void flushInternal ( ) { try { if ( w != null && readyForCommit ) { w . commit ( ) ; copy ( index , FSDirectory . open ( getIndexDirectory ( ) . toPath ( ) ) ) ; readyForCommit = false ; reader = null ; isInitialized = false ; } } catch ( Exception e ) { log . error ( "Error while Flushing Lucene Indexes, Cause... | Flush internal . |
36,139 | public void close ( ) { try { if ( w != null && readyForCommit ) { w . commit ( ) ; copy ( index , FSDirectory . open ( getIndexDirectory ( ) . toPath ( ) ) ) ; } } catch ( Exception e ) { log . error ( "Error while closing lucene indexes, Caused by: " , e ) ; throw new LuceneIndexingException ( "Error while closing lu... | Close of transaction . |
36,140 | private Document indexDocument ( EntityMetadata metadata , final MetamodelImpl metaModel , Object object , String parentId , Class < ? > clazz ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Indexing @Entity[{}],{} " , metadata . getEntityClazz ( ) . getName ( ) , object ) ; } Document currentDoc = updateOrCreateI... | Index document . |
36,141 | private Document updateOrCreateIndexNonSuperColumnFamily ( EntityMetadata metadata , final MetamodelImpl metaModel , Object entity , String parentId , Class < ? > clazz , boolean isUpdate , boolean isEmbeddedId , Object rowKey ) { Document document = new Document ( ) ; addEntityClassToDocument ( metadata , entity , doc... | update or Create Index for non super columnfamily |
36,142 | private Document updateOrCreateIndexCollectionTypeEmbeddedObject ( EntityMetadata metadata , final MetamodelImpl metaModel , Object entity , String parentId , Class < ? > clazz , boolean isUpdate , Document document , Object embeddedObject , Object rowKey , String attributeName , EmbeddableType embeddableAttribute ) { ... | update or create indexes when embedded object is of collection type |
36,143 | private void updateDocument ( EntityMetadata metadata , final MetamodelImpl metaModel , Object entity , String parentId , Class < ? extends Object > class1 , boolean b ) { updateOrCreateIndex ( metadata , metaModel , entity , parentId , entity . getClass ( ) , true ) ; onCommit ( ) ; } | Updates document . |
36,144 | private String appendRange ( final String value , final boolean inclusive , final boolean isGreaterThan , final Class clazz ) { String appender = " " ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( ":" ) ; sb . append ( inclusive ? "[" : "{" ) ; sb . append ( isGreaterThan ? value : "*" ) ; sb . append ( app... | Append range . |
36,145 | public static final Object deepCopy ( Object source , final KunderaMetadata kunderaMetadata ) { Map < Object , Object > copiedObjectMap = new HashMap < Object , Object > ( ) ; Object target = deepCopyUsingMetadata ( source , copiedObjectMap , kunderaMetadata ) ; copiedObjectMap . clear ( ) ; copiedObjectMap = null ; re... | Deep copy . |
36,146 | private static Object searchInCacheThenCopy ( Map < Object , Object > copiedObjectMap , Object sourceObject , final KunderaMetadata kunderaMetadata ) { Object copyTargetRelObj = null ; copyTargetRelObj = deepCopyUsingMetadata ( sourceObject , copiedObjectMap , kunderaMetadata ) ; return copyTargetRelObj ; } | Search in cache then copy . |
36,147 | public static Object getFieldInstance ( List chids , Field f ) { if ( Set . class . isAssignableFrom ( f . getType ( ) ) ) { Set col = new HashSet ( chids ) ; return col ; } return chids ; } | Gets the field instance . |
36,148 | public Object getEntityFromGFSDBFile ( Class < ? > entityClazz , Object entity , EntityMetadata m , GridFSDBFile outputFile , KunderaMetadata kunderaMetadata ) { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; String id = ( ( Abstr... | Gets the entity from GFSDBFile . |
36,149 | public Map < String , DBObject > getDocumentFromEntity ( EntityMetadata m , Object entity , List < RelationHolder > relations , final KunderaMetadata kunderaMetadata ) throws PropertyAccessException { Map < String , DBObject > dbObjects = new HashMap < String , DBObject > ( ) ; MetamodelImpl metaModel = ( MetamodelImpl... | Gets the document from entity . |
36,150 | public GridFSInputFile getGFSInputFileFromEntity ( GridFS gfs , EntityMetadata m , Object entity , KunderaMetadata kunderaMetadata , boolean isUpdate ) { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entityType = metaM... | Gets the GFSInputFile from entity . |
36,151 | private GridFSInputFile createGFSInputFile ( GridFS gfs , Object entity , Field f ) { Object obj = PropertyAccessorHelper . getObject ( entity , f ) ; GridFSInputFile gridFSInputFile = null ; if ( f . getType ( ) . isAssignableFrom ( byte [ ] . class ) ) gridFSInputFile = gfs . createFile ( ( byte [ ] ) obj ) ; else if... | Creates the GFS Input file . |
36,152 | public Object getLobFromGFSEntity ( GridFS gfs , EntityMetadata m , Object entity , KunderaMetadata kunderaMetadata ) { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entityType = metaModel . entity ( m . getEntityClazz... | Gets the lob from GFS entity . |
36,153 | public DBObject getMetadataFromGFSEntity ( GridFS gfs , EntityMetadata m , Object entity , KunderaMetadata kunderaMetadata ) { MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( m . getPersistenceUnit ( ) ) ; EntityType entityType = metaModel . entity ( m . getEnti... | Gets the metadata from GFS entity . |
36,154 | @ SuppressWarnings ( { "UnusedReturnValue" , "WeakerAccess" } ) public PagerFragment addFragment ( String title , Fragment fragment ) { this . mFragmentTitles . add ( title ) ; this . mFragments . add ( fragment ) ; return this ; } | Add a Fragment to this PagerFragment . |
36,155 | public static Style red ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_RED ) ; return style ; } | Default material red transparent style for SuperToasts . |
36,156 | public static Style pink ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_PINK ) ; return style ; } | Default material pink transparent style for SuperToasts . |
36,157 | public static Style purple ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_PURPLE ) ; return style ; } | Default material purple transparent style for SuperToasts . |
36,158 | public static Style deepPurple ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_DEEP_PURPLE ) ; return style ; } | Default material deep purple transparent style for SuperToasts . |
36,159 | public static Style indigo ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_INDIGO ) ; return style ; } | Default material indigo transparent style for SuperToasts . |
36,160 | public static Style blue ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_BLUE ) ; return style ; } | Default material blue transparent style for SuperToasts . |
36,161 | public static Style lightBlue ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_LIGHT_BLUE ) ; return style ; } | Default material light blue transparent style for SuperToasts . |
36,162 | public static Style cyan ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_CYAN ) ; return style ; } | Default material cyan transparent style for SuperToasts . |
36,163 | public static Style teal ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_TEAL ) ; return style ; } | Default material teal transparent style for SuperToasts . |
36,164 | public static Style green ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_GREEN ) ; return style ; } | Default material green transparent style for SuperToasts . |
36,165 | public static Style lightGreen ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_LIGHT_GREEN ) ; return style ; } | Default material light green transparent style for SuperToasts . |
36,166 | public static Style lime ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_LIME ) ; style . messageTextColor = PaletteUtils . getSolidColor ( PaletteUtils . DARK_GREY ) ; style . buttonDividerColor = PaletteUtils . getSolidColor ( PaletteUtils . DARK_GREY )... | Default material lime transparent style for SuperToasts . |
36,167 | public static Style yellow ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_YELLOW ) ; style . messageTextColor = PaletteUtils . getSolidColor ( PaletteUtils . DARK_GREY ) ; style . buttonDividerColor = PaletteUtils . getSolidColor ( PaletteUtils . DARK_GR... | Default material yellow transparent style for SuperToasts . |
36,168 | public static Style amber ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_AMBER ) ; return style ; } | Default material amber transparent style for SuperToasts . |
36,169 | public static Style orange ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_ORANGE ) ; return style ; } | Default material orange transparent style for SuperToasts . |
36,170 | public static Style deepOrange ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_DEEP_ORANGE ) ; return style ; } | Default material deep orange transparent style for SuperToasts . |
36,171 | public static Style brown ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_BROWN ) ; return style ; } | Default material brown transparent style for SuperToasts . |
36,172 | public static Style grey ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_GREY ) ; return style ; } | Default material grey transparent style for SuperToasts . |
36,173 | public static Style blueGrey ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_BLUE_GREY ) ; return style ; } | Default material blue - grey transparent style for SuperToasts . |
36,174 | public static Style rottenBanana ( ) { final Style style = new Style ( ) ; style . color = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_YELLOW ) ; style . frame = FRAME_LOLLIPOP ; style . messageTextColor = PaletteUtils . getSolidColor ( PaletteUtils . MATERIAL_BROWN ) ; style . buttonDividerColor = PaletteUt... | Default material rotten banana transparent style for SuperToasts . |
36,175 | public SuperActivityToast setProgress ( int progress ) { if ( this . mProgressBar == null ) { Log . e ( getClass ( ) . getName ( ) , "Could not set SuperActivityToast " + "progress, are you sure you set the type to TYPE_PROGRESS_CIRCLE " + "or TYPE_PROGRESS_BAR?" ) ; return this ; } this . mStyle . progress = progress ... | Set the progress of the ProgressBar in a TYPE_PROGRESS_BAR SuperActivityToast . This can be called multiple times after the SuperActivityToast is showing . |
36,176 | @ SuppressLint ( "InflateParams" ) protected View onCreateView ( Context context , LayoutInflater layoutInflater , int type ) { return layoutInflater . inflate ( R . layout . supertoast , null ) ; } | Protected View that is overridden by the SuperActivityToast class . |
36,177 | public static int convertToDIP ( int pixels ) { return Math . round ( TypedValue . applyDimension ( TypedValue . COMPLEX_UNIT_DIP , pixels , Resources . getSystem ( ) . getDisplayMetrics ( ) ) ) ; } | Returns a density independent pixel value rounded to the nearest integer for the desired dimension . |
36,178 | private void showNextSuperToast ( ) { if ( superToastPriorityQueue . isEmpty ( ) ) return ; final SuperToast superToast = superToastPriorityQueue . peek ( ) ; if ( ! superToast . isShowing ( ) ) { final Message message = obtainMessage ( Messages . DISPLAY_SUPERTOAST ) ; message . obj = superToast ; sendMessage ( messag... | Show the next SuperToast in the current queue . If a SuperToast is currently showing do nothing . The currently showing SuperToast will call this method when it dismisses . |
36,179 | private void sendDelayedMessage ( SuperToast superToast , int messageId , long delay ) { Message message = obtainMessage ( messageId ) ; message . obj = superToast ; sendMessageDelayed ( message , delay ) ; } | Send a message at a later time . This is used to dismiss a SuperToast . |
36,180 | private void displaySuperToast ( SuperToast superToast ) { if ( superToast . isShowing ( ) ) return ; if ( superToast instanceof SuperActivityToast ) { if ( ( ( SuperActivityToast ) superToast ) . getViewGroup ( ) == null ) { Log . e ( getClass ( ) . getName ( ) , ERROR_SAT_VIEWGROUP_NULL ) ; return ; } try { ( ( Super... | Try to show the SuperToast . SuperToasts will be shown using the WindowManager while SuperActivityToasts will be shown using their supplied ViewGroup . |
36,181 | void removeSuperToast ( final SuperToast superToast ) { if ( superToast instanceof SuperActivityToast ) { if ( ! superToast . isShowing ( ) ) { this . superToastPriorityQueue . remove ( superToast ) ; return ; } final Animator animator = AnimationUtils . getHideAnimation ( ( SuperActivityToast ) superToast ) ; animator... | Removes a showing SuperToast . This method will poll the Queue as well as try to show the next SuperToast if one exists in the Queue . |
36,182 | public void create ( final T value ) throws SQLException { transactionTemplate . doInTransaction ( new SQLFunction < Connection , Object > ( ) { public Object apply ( Connection connection ) throws SQLException { delegate . create ( connection , value ) ; return null ; } } ) ; } | insert value into the db through the specified connection . |
36,183 | public void delete ( final Collection < K > keys ) throws SQLException { transactionTemplate . doInTransaction ( new SQLFunction < Connection , Object > ( ) { public Object apply ( Connection connection ) throws SQLException { delegate . delete ( connection , keys ) ; return null ; } } ) ; } | delete the objects with the specified keys . |
36,184 | public CsvWriter < T > append ( T value ) throws IOException { try { mapper . mapTo ( value , appendable , mappingContext ) ; } catch ( Exception e ) { ErrorHelper . rethrow ( e ) ; } return this ; } | write the specified value to the underlying appendable . |
36,185 | public final B addKey ( String column ) { return addMapping ( column , calculatedIndex ++ , FieldMapperColumnDefinition . < K > key ( ) ) ; } | add a new mapping to the specified property with a key property definition and an undefined type . The index is incremented for each non indexed property mapping . |
36,186 | @ SuppressWarnings ( "unchecked" ) public final B addMapper ( FieldMapper < ROW , T > mapper ) { setRowMapperBuilder . addMapper ( mapper ) ; return ( B ) this ; } | append a FieldMapper to the mapping list . |
36,187 | public JdbcMapperFactory getterFactory ( final GetterFactory < ResultSet , JdbcColumnKey > getterFactory ) { return addGetterFactory ( new ContextualGetterFactoryAdapter < ResultSet , JdbcColumnKey > ( getterFactory ) ) ; } | Override the default implementation of the GetterFactory used to get access to value from the ResultSet . |
36,188 | public JdbcMapperFactory addCustomFieldMapper ( String key , FieldMapper < ResultSet , ? > fieldMapper ) { return addColumnDefinition ( key , FieldMapperColumnDefinition . < JdbcColumnKey > customFieldMapperDefinition ( fieldMapper ) ) ; } | Associate the specified FieldMapper for the specified property . |
36,189 | public JdbcMapperFactory addCustomGetter ( String key , Getter < ResultSet , ? > getter ) { return addColumnDefinition ( key , FieldMapperColumnDefinition . < JdbcColumnKey > customGetter ( getter ) ) ; } | Associate the specified Getter for the specified property . |
36,190 | public < T > JdbcMapper < T > newMapper ( final Class < T > target , final ResultSetMetaData metaData ) throws SQLException { JdbcMapperBuilder < T > builder = newBuilder ( target ) ; builder . addMapping ( metaData ) ; return builder . mapper ( ) ; } | Will create a newInstance of JdbcMapper based on the specified metadata and the target class . |
36,191 | public < T > JdbcMapperBuilder < T > newBuilder ( final Class < T > target ) { return newBuilder ( ( Type ) target ) ; } | Will create a newInstance of JdbcMapperBuilder on the specified target class . |
36,192 | public < T > JdbcMapperBuilder < T > newBuilder ( final TypeReference < T > target ) { return newBuilder ( target . getType ( ) ) ; } | Will create a newInstance of JdbcMapperBuilder on the type T specified by the typeReference . |
36,193 | public < T > JdbcMapperBuilder < T > newBuilder ( final Type target ) { ClassMeta < T > classMeta = getClassMeta ( target ) ; return newBuilder ( classMeta ) ; } | Will create a newInstance of JdbcMapperBuilder on the specified type . |
36,194 | public < T > DynamicJdbcMapper < T > newMapper ( final Class < T > target ) { return newMapper ( ( Type ) target ) ; } | Will create a DynamicMapper on the specified target class . |
36,195 | public < T > DynamicJdbcMapper < T > newMapper ( final TypeReference < T > target ) { return newMapper ( target . getType ( ) ) ; } | Will create a DynamicMapper on the type specified by the TypeReference . |
36,196 | public < T > DynamicJdbcMapper < T > newMapper ( final Type target ) { final ClassMeta < T > classMeta = getClassMeta ( target ) ; return new DynamicJdbcSetRowMapper < T > ( new SetRowMapperFactory < T > ( classMeta ) , new MapperKeyFactory ( ) , new MapperKeyFactory ( ) ) ; } | Will create a DynamicMapper on the specified type . |
36,197 | public < T > DiscriminatorJdbcBuilder < T > newDiscriminator ( String column ) { ignorePropertyNotFound ( ) ; addColumnDefinition ( column , FieldMapperColumnDefinition . < JdbcColumnKey > ignoreDefinition ( ) ) ; return new DiscriminatorJdbcBuilder < T > ( column , this ) ; } | Create a discriminator builder based on the specified property |
36,198 | protected < P > void addMapping ( K columnKey , ColumnDefinition < K , ? > columnDefinition , PropertyMeta < T , P > prop ) { propertyMappingsBuilder . addProperty ( columnKey , columnDefinition , prop ) ; } | the keys are initialised |
36,199 | public DiscriminatorJdbcSubBuilder when ( String value , Type type ) { return when ( new DiscriminatorPredicate ( value ) , type ) ; } | Add a discriminator value with its associated type . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.