Skip to content

Commit

Permalink
Merge pull request #144 from MansurAshraf/develop
Browse files Browse the repository at this point in the history
Added Hbase Injections
  • Loading branch information
sritchie committed Sep 11, 2013
2 parents 3280b30 + 3ed9eea commit 28e267a
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.twitter.bijection.hbase

import HBaseBijections._
import com.twitter.bijection._
import Injection._
import org.apache.hadoop.hbase.io.ImmutableBytesWritable

/**
* @author Mansur Ashraf
* @since 9/10/13
*/
object HBaseInjections {

implicit lazy val string2BytesInj:Injection[String, StringBytes] = fromBijectionRep[String, StringBytes]
implicit lazy val long2BytesInj:Injection[Long, LongBytes] = fromBijectionRep[Long, LongBytes]
implicit lazy val boolean2BytesInj:Injection[Boolean, BooleanBytes] = fromBijectionRep[Boolean, BooleanBytes]
implicit lazy val int2BytesInj:Injection[Int, IntBytes] = fromBijectionRep[Int, IntBytes]
implicit lazy val float2BytesInj:Injection[Float, FloatBytes] = fromBijectionRep[Float, FloatBytes]
implicit lazy val short2BytesInj:Injection[Short, ShortBytes] = fromBijectionRep[Short, ShortBytes]
implicit lazy val double2BytesInj:Injection[Double, DoubleBytes] = fromBijectionRep[Double, DoubleBytes]
implicit lazy val bigdecimal2BytesInj:Injection[BigDecimal, BigDecimalBytes] = fromBijectionRep[BigDecimal, BigDecimalBytes]
implicit lazy val string2BytesWritableInj:Injection[String, ImmutableBytesWritable] = fromBijectionRep[String, ImmutableBytesWritable]
implicit lazy val int2BytesWritableInj:Injection[Int, ImmutableBytesWritable] = fromBijectionRep[Int, ImmutableBytesWritable]
implicit lazy val long2BytesWritableInj:Injection[Long, ImmutableBytesWritable] = fromBijectionRep[Long, ImmutableBytesWritable]
implicit lazy val double2BytesWritableInj:Injection[Double, ImmutableBytesWritable]= fromBijectionRep[Double, ImmutableBytesWritable]
implicit lazy val float2BytesWritableInj:Injection[Float, ImmutableBytesWritable] = fromBijectionRep[Float, ImmutableBytesWritable]
implicit lazy val short2BytesWritableInj:Injection[Short, ImmutableBytesWritable] = fromBijectionRep[Short, ImmutableBytesWritable]
implicit lazy val boolean2BytesWritableInj:Injection[Boolean, ImmutableBytesWritable] = fromBijectionRep[Boolean, ImmutableBytesWritable]
implicit lazy val bigDecimal2BytesWritableInj:Injection[BigDecimal, ImmutableBytesWritable] = fromBijectionRep[BigDecimal, ImmutableBytesWritable]
}

0 comments on commit 28e267a

Please sign in to comment.