Package com.google.cloud.bigquery
Class Routine
- java.lang.Object
-
- com.google.cloud.bigquery.RoutineInfo
-
- com.google.cloud.bigquery.Routine
-
- All Implemented Interfaces:
Serializable
public class Routine extends RoutineInfo
A Google BigQuery Routine.Objects of this class are immutable. Operations that modify the routine like
update(com.google.cloud.bigquery.BigQuery.RoutineOption...)
return a new object. To get aroutine
object with the most recent information usereload(com.google.cloud.bigquery.BigQuery.RoutineOption...)
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Routine.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete()
Deletes this routine.boolean
equals(Object obj)
boolean
exists()
Checks if this routine exists.BigQuery
getBigQuery()
Returns the routine'sBigQuery
object used to issue requests.int
hashCode()
void
readObject(ObjectInputStream in)
Routine
reload(BigQuery.RoutineOption... options)
Fetches this routine's latest information.Routine.Builder
toBuilder()
Returns a builder pre-populated using the current values of this routine.Routine
update(BigQuery.RoutineOption... options)
Update's the routine's information with this Routine's information.-
Methods inherited from class com.google.cloud.bigquery.RoutineInfo
getArguments, getBody, getCreationTime, getDescription, getDeterminismLevel, getEtag, getImportedLibraries, getLanguage, getLastModifiedTime, getRemoteFunctionOptions, getReturnTableType, getReturnType, getRoutineId, getRoutineType, newBuilder, of, toString
-
-
-
-
Method Detail
-
exists
public boolean exists()
Checks if this routine exists.
-
reload
public Routine reload(BigQuery.RoutineOption... options)
Fetches this routine's latest information. Returnsnull
if the routine does not exist.
-
update
public Routine update(BigQuery.RoutineOption... options)
Update's the routine's information with this Routine's information. This method does not allow changing the RoutineId identifier of the routine. A newRoutine
is returned.
-
delete
public boolean delete()
Deletes this routine.- Returns:
true
if routine was deleted,false
if it was not found- Throws:
BigQueryException
- upon failure
-
getBigQuery
public BigQuery getBigQuery()
Returns the routine'sBigQuery
object used to issue requests.
-
toBuilder
public Routine.Builder toBuilder()
Description copied from class:RoutineInfo
Returns a builder pre-populated using the current values of this routine.- Overrides:
toBuilder
in classRoutineInfo
-
equals
public final boolean equals(Object obj)
- Overrides:
equals
in classRoutineInfo
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classRoutineInfo
-
readObject
public void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-