Tabnine Logo
GranularityType.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.apache.druid.java.util.common.granularity.GranularityType

Best Java code snippets using org.apache.druid.java.util.common.granularity.GranularityType.toString (Showing top 2 results out of 315)

origin: apache/incubator-druid

@Override
public void serialize(JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
  throws IOException
{
 // Retain the same behavior as before #3850.
 // i.e. when Granularity class was an enum.
 if (GranularityType.isStandard(this)) {
  jsonGenerator.writeString(GranularityType.fromPeriod(getPeriod()).toString());
 } else {
  jsonGenerator.writeStartObject();
  jsonGenerator.writeStringField("type", "period");
  jsonGenerator.writeObjectField("period", getPeriod());
  jsonGenerator.writeObjectField("timeZone", getTimeZone());
  jsonGenerator.writeObjectField("origin", getOrigin());
  jsonGenerator.writeEndObject();
 }
}
origin: org.apache.druid/java-util

@Override
public void serialize(
  JsonGenerator jsonGenerator, SerializerProvider serializerProvider
) throws IOException, JsonProcessingException
{
 // Retain the same behavior as before #3850.
 // i.e. when Granularity class was an enum.
 if (GranularityType.isStandard(this)) {
  jsonGenerator.writeString(GranularityType.fromPeriod(getPeriod()).toString());
 } else {
  jsonGenerator.writeStartObject();
  jsonGenerator.writeStringField("type", "period");
  jsonGenerator.writeObjectField("period", getPeriod());
  jsonGenerator.writeObjectField("timeZone", getTimeZone());
  jsonGenerator.writeObjectField("origin", getOrigin());
  jsonGenerator.writeEndObject();
 }
}
org.apache.druid.java.util.common.granularityGranularityTypetoString

Popular methods of GranularityType

  • fromPeriod
    Note: This is only an estimate based on the values in period. This will not work for complicated per
  • getDefaultGranularity
  • values
  • create
  • getDateTime
  • getDefaultFormat
  • getHiveFormat
  • getLowerDefaultFormat
  • isStandard
    For a select subset of granularites, users can specify them directly as string. These are "predefine
  • valueOf
  • name
  • name

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Kernel (java.awt.image)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Path (java.nio.file)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BoxLayout (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now