abstract class ProductCsvRenderer[T <: Product] extends BaseCsvProductGenerator[T] with BaseCsvRenderer[T] with CsvProduct[T]
Abstract class ProductCsvRenderer[T] which extends BaseCsvRenderer[T] and CsvGenerator[T] and CsvProduct[T] to render, as CSV, an instance of Product (typically a case class).
- T
the contravariant type of object to be rendered.
- Alphabetic
- By Inheritance
- ProductCsvRenderer
- CsvProduct
- BaseCsvRenderer
- CsvRenderer
- Renderer
- BaseCsvProductGenerator
- CsvProductGenerator
- StandardCsvGenerator
- CsvGenerator
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ProductCsvRenderer()(implicit arg0: ClassTag[T], c: CsvAttributes)
- c
(implicit) CsvAttributes
Abstract Value Members
- abstract def elements(t: T): Strings
Method to obtain a Seq of Strings corresponding to each of the members of the given value of t.
Method to obtain a Seq of Strings corresponding to each of the members of the given value of t.
- t
an instance of type T.
- returns
a Strings, i.e. a Seq[String].
- Definition Classes
- BaseCsvRenderer
- abstract def toColumnNames(po: Option[String], no: Option[String]): String
Method to generate a list of appropriate column names for a value of t.
Method to generate a list of appropriate column names for a value of t.
- po
the (optional) name of the parent.
- no
the (optional) name of this column.
- returns
a list of names of the form parent.column.
- Definition Classes
- CsvProductGenerator
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val csvAttributes: CsvAttributes
- Definition Classes
- StandardCsvGenerator → CsvGenerator
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fieldNames(implicit tc: ClassTag[T]): Array[String]
Extracts the names of the fields for the type
Tusing runtime reflection.Extracts the names of the fields for the type
Tusing runtime reflection. This method is useful for generating field names for case classes or other types in the context of CSV generation.- tc
An implicit
ClassTagfor the typeT, which is used to access runtime type information about the type.- returns
An array of strings, where each string corresponds to the name of a field in the type
T.
- Definition Classes
- CsvProductGenerator
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def merge(po: Option[String], no: Option[String]): Option[String]
Merges two optional strings into a single optional string.
Merges two optional strings into a single optional string. If both
poandnoare defined, the resulting string is their concatenation in the formatpo.no. If only one of the options is defined, it returns that single option. If neither are defined, it returnsNone.- po
an optional prefix string; if defined, it will form the first part of the resulting string.
- no
an optional suffix string; if defined, it will form the second part of the resulting string.
- returns
an optional string in the format
po.noif both options are defined, or the defined option if only one is present, orNoneif both areNone.
- Definition Classes
- StandardCsvGenerator
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def render(t: T, attrs: Map[String, String]): String
Concrete method to render t as a single String, where the columns are delimited according to
csvAttributes.delimiter.Concrete method to render t as a single String, where the columns are delimited according to
csvAttributes.delimiter.- t
the input parameter, i.e., the T object to render.
- attrs
a map of attributes for this value of O.
- returns
an instance of type String.
- Definition Classes
- BaseCsvRenderer → Renderer
- def render(t: T): String
Render an instance of T as an O, qualifying the rendering with no attributes.
Render an instance of T as an O, qualifying the rendering with no attributes.
- t
a T to be rendered.
- returns
an instance of type O.
- Definition Classes
- Renderer
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toColumnName(po: Option[String], name: String): String
Converts the given optional parent name and column name into a single formatted column name.
Converts the given optional parent name and column name into a single formatted column name.
- po
An optional string representing the parent column or prefix, which may be used to create a nested or hierarchical column name.
- name
The name of the base column to be formatted.
- returns
A formatted string representing the column name, typically following the pattern "parent.column", if a parent name is provided.
- Definition Classes
- CsvProductGenerator → CsvGenerator
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)