Improve model for CWE-089

This commit is contained in:
Mauro Baluda
2026-01-13 21:48:43 +01:00
parent 89f0e79ea1
commit d335f039ef
15 changed files with 137 additions and 223 deletions

View File

@@ -1,18 +1,3 @@
/*
* Copyright (c) 2016 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java;
public class Bucket {

View File

@@ -1,25 +1,15 @@
/*
* Copyright (c) 2016 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java;
import com.couchbase.client.core.env.SeedNode;
import com.couchbase.client.java.analytics.AnalyticsOptions;
import com.couchbase.client.java.analytics.AnalyticsResult;
import com.couchbase.client.java.query.QueryMetaData;
import com.couchbase.client.java.query.QueryOptions;
import com.couchbase.client.java.query.QueryResult;
import com.couchbase.client.java.query.QueryRow;
import java.io.Closeable;
import java.util.Set;
import java.util.function.Consumer;
public class Cluster implements Closeable {
@@ -40,10 +30,33 @@ public class Cluster implements Closeable {
return null;
}
public AnalyticsResult analyticsQuery(final String statement) {
return null;
}
public AnalyticsResult analyticsQuery(final String statement, final AnalyticsOptions options) {
return null;
}
public QueryResult query(final String statement) {
return null;
}
public QueryResult query(final String statement, final QueryOptions options) {
return null;
}
public QueryMetaData queryStreaming(String statement, Consumer<QueryRow> rowAction) {
return null;
}
public QueryMetaData queryStreaming(
String statement, QueryOptions options, Consumer<QueryRow> rowAction) {
return null;
}
@Override
public void close() {}
}

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 2018 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java;
import com.couchbase.client.java.kv.InsertOptions;
import com.couchbase.client.java.kv.MutationResult;
import com.couchbase.client.java.kv.ReplaceOptions;
import com.couchbase.client.java.kv.UpsertOptions;
public class Collection {
public MutationResult insert(final String id, final Object content) {
return null;
}
public MutationResult insert(final String id, final Object content, final InsertOptions options) {
return null;
}
public MutationResult upsert(final String id, final Object content) {
return null;
}
public MutationResult upsert(final String id, final Object content, final UpsertOptions options) {
return null;
}
public MutationResult replace(final String id, final Object content) {
return null;
}
public MutationResult replace(
final String id, final Object content, final ReplaceOptions options) {
return null;
}
}

View File

@@ -0,0 +1,3 @@
package com.couchbase.client.java.analytics;
public class AnalyticsOptions {}

View File

@@ -0,0 +1,3 @@
package com.couchbase.client.java.analytics;
public class AnalyticsResult {}

View File

@@ -1,33 +0,0 @@
/*
* Copyright (c) 2016 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java.json;
import java.io.Serializable;
public class JsonObject extends JsonValue implements Serializable {
public static JsonObject create() {
return null;
}
public JsonObject put(final String name, final Object value) {
return null;
}
public JsonObject putNull(final String name) {
return null;
}
}

View File

@@ -1,19 +0,0 @@
/*
* Copyright (c) 2016 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java.json;
public abstract class JsonValue {}

View File

@@ -0,0 +1,3 @@
package com.couchbase.client.java.query;
public class QueryMetaData {}

View File

@@ -0,0 +1,3 @@
package com.couchbase.client.java.query;
public class QueryOptions {}

View File

@@ -1,19 +1,3 @@
/*
* Copyright (c) 2019 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.couchbase.client.java.query;
public class QueryResult {}

View File

@@ -0,0 +1,3 @@
package com.couchbase.client.java.query;
public class QueryRow {}