method2testcases stringlengths 118 3.08k |
|---|
### Question:
DefaultPreparedStatementParameterSetter implements PreparedStatementParameterSetter { @Override public void setParameter(PreparedStatement statement, int parameterIndex, final Object o, final AttributeMetaInfo attributeMetaInfo, final Connection connection) throws SQLException { if (!(o instanceof String)... |
### Question:
DefaultValueStrategyBuilder { public Condition when(final Predicate<ColumnModel> predicate) { return new PredicateCondition(predicate); } Condition when(final Predicate<ColumnModel> predicate); Condition whenTableNameMatches(final String regex); Condition whenColumnNameMatches(final String regex); void s... |
### Question:
DefaultValueStrategyBuilder { public Condition whenColumnNameMatches(final String regex) { return new ColumnNameRegexCondition(regex); } Condition when(final Predicate<ColumnModel> predicate); Condition whenTableNameMatches(final String regex); Condition whenColumnNameMatches(final String regex); void se... |
### Question:
DefaultValueStrategyBuilder { public Condition whenTableNameMatches(final String regex) { return new TableNameRegexCondition(regex); } Condition when(final Predicate<ColumnModel> predicate); Condition whenTableNameMatches(final String regex); Condition whenColumnNameMatches(final String regex); void setF... |
### Question:
JpaMetamodelRedGProvider implements NameProvider, DataTypeProvider { @Override public String getMethodNameForReference(ForeignKey foreignKey) { ForeignKeyRelation foreignKeyRelation = toForeignKeyRelation(foreignKey); SingularAttribute singularAttribute = singularAttributesByForeignKeyRelation.get(foreign... |
### Question:
DefaultValueStrategyBuilder { public void setFallbackStrategy(DefaultValueStrategy fallbackStrategy) { this.fallbackStrategy = fallbackStrategy; } Condition when(final Predicate<ColumnModel> predicate); Condition whenTableNameMatches(final String regex); Condition whenColumnNameMatches(final String regex... |
### Question:
Matchers { public static Predicate<ColumnModel> tableName(final Predicate<String> condition) { return (cM) -> condition.test(cM.getDbTableName()); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<... |
### Question:
Matchers { public static Predicate<ColumnModel> fullTableName(final Predicate<String> condition) { return (cM) -> condition.test(cM.getDbFullTableName()); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Pr... |
### Question:
Matchers { public static Predicate<ColumnModel> columnName(final Predicate<String> condition) { return (cM) -> condition.test(cM.getDbName()); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<Stri... |
### Question:
Matchers { public static Predicate<ColumnModel> type(final Predicate<Class<?>> condition) { return (cM) -> condition.test(cM.getJavaTypeAsClass()); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate... |
### Question:
Matchers { public static Predicate<ColumnModel> notNull(final Predicate<Boolean> condition) { return (cM) -> condition.test(cM.isNotNull()); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<String... |
### Question:
Matchers { public static Predicate<ColumnModel> isNotNull() { return ColumnModel::isNotNull; } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<String> condition); static Predicate<ColumnModel> colu... |
### Question:
Matchers { public static Predicate<ColumnModel> isUnique() { return ColumnModel::isUnique; } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<String> condition); static Predicate<ColumnModel> column... |
### Question:
Matchers { public static Predicate<ColumnModel> isPrimary() { return ColumnModel::isPartOfPrimaryKey; } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnModel> fullTableName(final Predicate<String> condition); static Predicate<ColumnMo... |
### Question:
Matchers { @Deprecated public static Predicate<ColumnModel> allOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .allMatch(c -> c.test(cM)); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnMod... |
### Question:
Matchers { @Deprecated public static Predicate<ColumnModel> anyOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .anyMatch(c -> c.test(cM)); } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicate<ColumnMod... |
### Question:
Matchers { public static Predicate<ColumnModel> oneOf(final Predicate<ColumnModel>... conditions) { return (cM) -> Arrays.stream(conditions) .map(c -> c.test(cM)).filter(b -> b).count() == 1; } private Matchers(); static Predicate<ColumnModel> tableName(final Predicate<String> condition); static Predicat... |
### Question:
Conditions { public static <T> Predicate<T> eq(T value) { return value::equals; } private Conditions(); static Predicate<T> eq(T value); static Predicate<T> neq(T value); static Predicate<String> contains(String value); static Predicate<String> matchesRegex(String regex); }### Answer:
@Test public void ... |
### Question:
Conditions { public static <T> Predicate<T> neq(T value) { return (d) -> !value.equals(d); } private Conditions(); static Predicate<T> eq(T value); static Predicate<T> neq(T value); static Predicate<String> contains(String value); static Predicate<String> matchesRegex(String regex); }### Answer:
@Test p... |
### Question:
Conditions { public static Predicate<String> contains(String value) { return (d) -> d.contains(value); } private Conditions(); static Predicate<T> eq(T value); static Predicate<T> neq(T value); static Predicate<String> contains(String value); static Predicate<String> matchesRegex(String regex); }### Ans... |
### Question:
Conditions { public static Predicate<String> matchesRegex(String regex) { return (d) -> d.matches(regex); } private Conditions(); static Predicate<T> eq(T value); static Predicate<T> neq(T value); static Predicate<String> contains(String value); static Predicate<String> matchesRegex(String regex); }### ... |
### Question:
ConditionalProvider implements PluggableDefaultValueProvider { @Override public <T> T getDefaultValue(final ColumnModel columnModel, final Class<T> type) { if (willProvide(columnModel)) { return internalProvider.getDefaultValue(columnModel, type); } else { return null; } } ConditionalProvider(final Plugga... |
### Question:
DefaultDefaultValueProvider implements PluggableDefaultValueProvider { @Override public boolean willProvide(final ColumnModel columnModel) { return true; } @Override boolean willProvide(final ColumnModel columnModel); @Override T getDefaultValue(final ColumnModel columnModel, final Class<T> type); }### ... |
### Question:
DefaultDefaultValueProvider implements PluggableDefaultValueProvider { @Override public <T> T getDefaultValue(final ColumnModel columnModel, final Class<T> type) { return valueStrategy.getDefaultValue(columnModel, type); } @Override boolean willProvide(final ColumnModel columnModel); @Override T getDefau... |
### Question:
AbstractRedG { public List<RedGEntity> getEntities() { return Collections.unmodifiableList(entities); } void addEntity(final RedGEntity entity); DefaultValueStrategy getDefaultValueStrategy(); void setDefaultValueStrategy(final DefaultValueStrategy defaultValueStrategy); SQLValuesFormatter getSqlValuesFo... |
### Question:
XmlFileDataTypeProvider implements DataTypeProvider { static TypeMappings deserializeXml(Reader xmlReader) { TypeMappings typeMappings; XStream xStream = createXStream(); typeMappings = (TypeMappings) xStream.fromXML(xmlReader, new TypeMappings()); return typeMappings; } XmlFileDataTypeProvider(Reader xml... |
### Question:
AbstractRedG { public void setDummyFactory(final DummyFactory dummyFactory) { if (entities.size() > 0) { throw new IllegalStateException("The dummy factory cannot be changed after an entity was generated!"); } if (dummyFactory == null) { this.dummyFactory = new DefaultDummyFactory(); } else { this.dummyFa... |
### Question:
AbstractRedG { public <T extends RedGEntity> T findSingleEntity(final Class<T> type, final Predicate<T> filter) { return this.entities.stream() .filter(obj -> Objects.equals(type, obj.getClass())) .map(type::cast) .filter(filter) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Could not find... |
### Question:
AbstractRedG { public <T extends RedGEntity> List<T> findEntities(final Class<T> type, final Predicate<T> filter) { return this.entities.stream() .filter(obj -> Objects.equals(type, obj.getClass())) .map(type::cast) .filter(filter) .collect(Collectors.toList()); } void addEntity(final RedGEntity entity);... |
### Question:
AbstractRedG { public List<String> generateSQLStatements() { return getEntitiesSortedForInsert().stream() .map(RedGEntity::getSQLString) .collect(Collectors.toList()); } void addEntity(final RedGEntity entity); DefaultValueStrategy getDefaultValueStrategy(); void setDefaultValueStrategy(final DefaultValu... |
### Question:
AbstractRedG { public void insertDataIntoDatabase(final Connection connection) { RedGDatabaseUtil.insertDataIntoDatabase(getEntitiesSortedForInsert(), connection, preparedStatementParameterSetter); } void addEntity(final RedGEntity entity); DefaultValueStrategy getDefaultValueStrategy(); void setDefaultV... |
### Question:
XmlFileDataTypeProvider implements DataTypeProvider { static XStream createXStream() { XStream xStream = new XStream(); xStream.processAnnotations(new Class[]{ ColumnTypeMapping.class, DefaultTypeMapping.class, TableTypeMapping.class, TypeMappings.class }); xStream.useAttributeFor(TableTypeMapping.class, ... |
### Question:
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { public static HotFragment getInstance() { return new HotFragment(); } static HotFragment getInstance(); @Override void onBindPage(); @OnClick({R.id.tv_city, R.id.dcl_search}) void onViewClicked(View view); @Override void onActivityRes... |
### Question:
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected int getLayoutId() { return R.layout.fragment_hot; } static HotFragment getInstance(); @Override void onBindPage(); @OnClick({R.id.tv_city, R.id.dcl_search}) void onViewClicked(View view); @Override void onActivityR... |
### Question:
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); } static HotFragme... |
### Question:
SqlStringUtils { public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.l... |
### Question:
SqlStringUtils { public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns)... |
### Question:
SqlStringUtils { public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); } s... |
### Question:
SqlStringUtils { public static String literal(String str) { return "'" + str + "'"; } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns); static String literal(String str); static Strin... |
### Question:
SqlStringUtils { public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int nu... |
### Question:
SqlStringUtils { public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuil... |
### Question:
SqlStringUtils { public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT... |
### Question:
AddressTemplate { public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumToken... |
### Question:
AddressTemplate { public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); } private AddressTemplate(String template); static Add... |
### Question:
AddressTemplate { public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key... |
### Question:
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) ... |
### Question:
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(... |
### Question:
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected Interact... |
### Question:
AddressTemplate { public static AddressTemplate of(String template) { return new AddressTemplate(template); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumTokens(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString()... |
### Question:
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends... |
### Question:
SimpleFernetKeyRotator extends AbstractFernetKeyRotator { protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStat... |
### Question:
AbstractFernetKeyRotator implements RequestStreamHandler { protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final... |
### Question:
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretVa... |
### Question:
SecretsManager { public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); } SecretsManager(final AWSSecretsMa... |
### Question:
SecretsManager { public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecre... |
### Question:
SecretsManager { public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult ... |
### Question:
SecretsManager { public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecre... |
### Question:
Token { public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializati... |
### Question:
Key { public static Key generateKey() { return generateKey(new SecureRandom()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom random); byte[] sign(final byte ve... |
### Question:
Key { public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector... |
### Question:
Key { protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final Secur... |
### Question:
Key { protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final ... |
### Question:
Key { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(... |
### Question:
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return ... |
### Question:
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build... |
### Question:
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSe... |
### Question:
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueReq... |
### Question:
Team { public String getId() { return Integer.toString(id); } Team(final int id, final String name); String getId(); String getName(); void setName(final String name); boolean isScrumTeam(); void setScrumTeam(final boolean isScrumTeam); List<Employee> getEmployees(); @Override int hashCode(); @Override bo... |
### Question:
JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); @Overrid... |
### Question:
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements
JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuil... |
### Question:
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements
JPAEdmAssociationSetView { @Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<Associ... |
### Question:
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements
JPAEdmAssociationSetView { @Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getCons... |
### Question:
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements
JPAEdmAssociationSetView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getConsistentEdm... |
### Question:
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public String getpUnitName() { return pUnitName; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitNa... |
### Question:
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public Metamodel getJPAMetaModel() { return metaModel; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getp... |
### Question:
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public boolean isConsistent() { return isConsistent; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUn... |
### Question:
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitNam... |
### Question:
Building { public List<Room> getRooms() { return rooms; } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final ... |
### Question:
JPAEdmComplexType extends JPAEdmBaseViewImpl implements
JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView v... |
### Question:
JPAEdmComplexType extends JPAEdmBaseViewImpl implements
JPAEdmComplexTypeView { @Override public ComplexType getEdmComplexType() { return currentComplexType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); @Over... |
### Question:
JPAEdmComplexType extends JPAEdmBaseViewImpl implements
JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView vie... |
### Question:
JPAEdmComplexType extends JPAEdmBaseViewImpl implements
JPAEdmComplexTypeView { @Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttri... |
### Question:
JPAEdmComplexType extends JPAEdmBaseViewImpl implements
JPAEdmComplexTypeView { @Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> co... |
### Question:
Employee { public String getId() { return Integer.toString(employeeId); } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager ... |
### Question:
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements
JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationVi... |
### Question:
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements
JPAEdmReferentialConstraintView { @Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView,
final JPAEdmEntityTy... |
### Question:
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements
JPAEdmReferentialConstraintView { @Override public String getEdmRelationShipName() { return relationShipName; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView,
final JPAEdmEntityTypeView entityTypeView, fi... |
### Question:
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements
JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView,
final JPAEdm... |
### Question:
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements
JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView,
final JPAEdmPropertyView propertyView); @Override JPAEd... |
### Question:
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements
JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView,
final JPAEdmPropertyView propertyView); @Override JPAEd... |
### Question:
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements
JPAEdmAssociationEndView { @Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1... |
### Question:
Employee { public String getEmployeeName() { return employeeName; } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager getMan... |
### Question:
JPAEdmAssociation extends JPAEdmBaseViewImpl implements
JPAEdmAssociationView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview,
final JPAEdmEnti... |
### Question:
JPAEdmAssociation extends JPAEdmBaseViewImpl implements
JPAEdmAssociationView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview,
final JPAEdmEntityTypeView entityTypeView,
final JPAEdmProper... |
### Question:
JPAEdmAssociation extends JPAEdmBaseViewImpl implements
JPAEdmAssociationView { @Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview,
final JPAEdmEntityTypeView entityTypeView... |
### Question:
JPAEdmAssociation extends JPAEdmBaseViewImpl implements
JPAEdmAssociationView { @Override public JPAEdmReferentialConstraintView getJPAEdmReferentialConstraintView() { if (inconsistentRefConstraintViewList.isEmpty()) { return null; } return inconsistentRefConstraintViewList.get(0); } JPAEdmAssociation... |
### Question:
JPAEdmReferentialConstraintRole extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintRoleView { @Override public boolean isExists() { return roleExists; } JPAEdmReferentialConstraintRole(
final JPAEdmReferentialConstraintRoleView.RoleType roleType,
final JPAEdmEntityTypeView entity... |
### Question:
JPAEdmReferentialConstraintRole extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintRoleView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintRoleBuilder(); } return builder; } JPAEdmReferentialConstraintRole(
final JPAEdmReferentia... |
### Question:
JPAEdmReferentialConstraintRole extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintRoleView { @Override public RoleType getRoleType() { return roleType; } JPAEdmReferentialConstraintRole(
final JPAEdmReferentialConstraintRoleView.RoleType roleType,
final JPAEdmEntityTypeView enti... |
### Question:
Manager extends Employee { public Manager(final int id, final String name) { super(id, name); } Manager(final int id, final String name); List<Employee> getEmployees(); }### Answer:
@Test public void testManager() { Manager manager = new Manager(1, "Walter Winter"); Employee employee = new Employee(2, "P... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.