Skip to content

Commit fe06164

Browse files
Added access modifier
1 parent bc6f0eb commit fe06164

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

v2/spanner-to-sourcedb/src/main/java/com/google/cloud/teleport/v2/templates/dbutils/dml/CassandraTypeHandler.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ public static Set<Object> handleStringifiedJsonToSet(String colName, JSONObject
877877
* @throws IllegalArgumentException If the {@code integerValue} is out of range for a {@code
878878
* smallint}.
879879
*/
880-
private static short convertToSmallInt(Integer integerValue) {
880+
public static short convertToSmallInt(Integer integerValue) {
881881
if (integerValue < Short.MIN_VALUE || integerValue > Short.MAX_VALUE) {
882882
throw new IllegalArgumentException("Value is out of range for smallint.");
883883
}
@@ -896,7 +896,7 @@ private static short convertToSmallInt(Integer integerValue) {
896896
* @throws IllegalArgumentException If the {@code integerValue} is out of range for a {@code
897897
* tinyint}.
898898
*/
899-
private static byte convertToTinyInt(Integer integerValue) {
899+
public static byte convertToTinyInt(Integer integerValue) {
900900
if (integerValue < Byte.MIN_VALUE || integerValue > Byte.MAX_VALUE) {
901901
throw new IllegalArgumentException("Value is out of range for tinyint.");
902902
}
@@ -912,7 +912,7 @@ private static byte convertToTinyInt(Integer integerValue) {
912912
* @param value The string to be escaped.
913913
* @return The escaped string where single quotes are replaced with double single quotes.
914914
*/
915-
private static String escapeCassandraString(String value) {
915+
public static String escapeCassandraString(String value) {
916916
return value.replace("'", "''");
917917
}
918918

@@ -928,7 +928,7 @@ private static String escapeCassandraString(String value) {
928928
* @return A string representation of the timestamp in UTC that is compatible with Cassandra.
929929
* @throws RuntimeException If the timestamp string is invalid or the conversion fails.
930930
*/
931-
private static String convertToCassandraTimestamp(String value, String timezoneOffset) {
931+
public static String convertToCassandraTimestamp(String value, String timezoneOffset) {
932932
try {
933933
ZonedDateTime dateTime = ZonedDateTime.parse(value);
934934
ZoneOffset offset = ZoneOffset.of(timezoneOffset);
@@ -949,7 +949,7 @@ private static String convertToCassandraTimestamp(String value, String timezoneO
949949
* @param dateString The date string in ISO-8601 format (e.g., "2024-12-05T00:00:00Z").
950950
* @return The {@link LocalDate} representation of the date.
951951
*/
952-
private static LocalDate convertToCassandraDate(String dateString) {
952+
public static LocalDate convertToCassandraDate(String dateString) {
953953
Instant instant = Instant.parse(dateString);
954954
Date date = Date.from(instant);
955955
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
@@ -966,7 +966,7 @@ private static LocalDate convertToCassandraDate(String dateString) {
966966
* @return The {@link Instant} representation of the timestamp.
967967
*/
968968

969-
private static Instant convertToCassandraTimestamp(String dateString) {
969+
public static Instant convertToCassandraTimestamp(String dateString) {
970970
return Instant.parse(dateString);
971971
}
972972

@@ -980,7 +980,7 @@ private static Instant convertToCassandraTimestamp(String dateString) {
980980
* @param value The string to check if it represents a valid UUID.
981981
* @return {@code true} if the string is a valid UUID, {@code false} otherwise.
982982
*/
983-
private static boolean isValidUUID(String value) {
983+
public static boolean isValidUUID(String value) {
984984
try {
985985
UUID.fromString(value);
986986
return true;
@@ -999,7 +999,7 @@ private static boolean isValidUUID(String value) {
999999
* @param value The string to check if it represents a valid IP address.
10001000
* @return {@code true} if the string is a valid IP address, {@code false} otherwise.
10011001
*/
1002-
private static boolean isValidIPAddress(String value) {
1002+
public static boolean isValidIPAddress(String value) {
10031003
try {
10041004
InetAddress.getByName(value);
10051005
return true;
@@ -1019,7 +1019,7 @@ private static boolean isValidIPAddress(String value) {
10191019
* @return {@code true} if the string is a valid JSON object, {@code false} otherwise.
10201020
*/
10211021

1022-
private static boolean isValidJSON(String value) {
1022+
public static boolean isValidJSON(String value) {
10231023
try {
10241024
new JSONObject(value);
10251025
return true;
@@ -1034,7 +1034,7 @@ private static boolean isValidJSON(String value) {
10341034
* @param value - The string to check.
10351035
* @return true if the string contains only ASCII characters, false otherwise.
10361036
*/
1037-
private static boolean isAscii(String value) {
1037+
public static boolean isAscii(String value) {
10381038
for (int i = 0; i < value.length(); i++) {
10391039
if (value.charAt(i) > 127) {
10401040
return false;

0 commit comments

Comments
 (0)