For IntelliJ IDEA and
Android Studio


private void myMethod () {}
/** * Copies this instance to a new one. * * @return the new instance */ public DeleteOptions copy() { DeleteOptions deleteOptions = new DeleteOptions() .writeConcern(getWriteConcern()); if (getCollation() != null) { deleteOptions.collation(Collation.builder(getCollation()).build()); } return deleteOptions; }
com.mongodb.client.model.Collation convert(final Collation collation) { return com.mongodb.client.model.Collation.builder() .locale(collation.locale()) .backwards(collation.backwards()) .caseLevel(collation.caseLevel()) .collationAlternate(collation.alternate()) .collationCaseFirst(collation.caseFirst()) .collationMaxVariable(collation.maxVariable()) .collationStrength(collation.strength()) .normalization(collation.normalization()) .numericOrdering(collation.numericOrdering()) .build(); }
source.normalization.ifPresent(builder::normalization); return builder.build(); };
private static Collation getCollation(Document dbObject) { Collation collation = null; if ( dbObject != null ) { String caseFirst = dbObject.getString( "caseFirst" ); Integer strength = dbObject.getInteger( "strength" ); String alternate = dbObject.getString( "alternate" ); String maxVariable = dbObject.getString( "maxVariable" ); collation = Collation.builder() .locale( (String) dbObject.get( "locale" ) ) .caseLevel( (Boolean) dbObject.get( "caseLevel" ) ) .numericOrdering( (Boolean) dbObject.get( "numericOrdering" ) ) .backwards( (Boolean) dbObject.get( "backwards" ) ) .collationCaseFirst( caseFirst == null ? null : CollationCaseFirst.fromString( caseFirst ) ) .collationStrength( strength == null ? null : CollationStrength.fromInt( strength ) ) .collationAlternate( alternate == null ? null : CollationAlternate.fromString( alternate ) ) .collationMaxVariable( maxVariable == null ? null : CollationMaxVariable.fromString( maxVariable ) ) .build(); } return collation; }
return builder.build();
source.normalization.ifPresent(builder::normalization); return builder.build(); };
private static Collation getCollation(Document dbObject) { Collation collation = null; if ( dbObject != null ) { String caseFirst = dbObject.getString( "caseFirst" ); Integer strength = dbObject.getInteger( "strength" ); String alternate = dbObject.getString( "alternate" ); String maxVariable = dbObject.getString( "maxVariable" ); collation = Collation.builder() .locale( (String) dbObject.get( "locale" ) ) .caseLevel( (Boolean) dbObject.get( "caseLevel" ) ) .numericOrdering( (Boolean) dbObject.get( "numericOrdering" ) ) .backwards( (Boolean) dbObject.get( "backwards" ) ) .collationCaseFirst( caseFirst == null ? null : CollationCaseFirst.fromString( caseFirst ) ) .collationStrength( strength == null ? null : CollationStrength.fromInt( strength ) ) .collationAlternate( alternate == null ? null : CollationAlternate.fromString( alternate ) ) .collationMaxVariable( maxVariable == null ? null : CollationMaxVariable.fromString( maxVariable ) ) .build(); } return collation; }
return builder.build();
return builder.build();
return builder.build();
return builder.build();
return builder.build();