001 /* 002 @license.text@ 003 */ 004 package biz.hammurapi.persistence; 005 006 public interface StringStorage { 007 008 /** 009 * Returns string by key. Null key is always mapped to null value. 010 * @param key 011 * @return 012 */ 013 String getText(Integer key); 014 015 /** 016 * Returns key for given text. Adds text to the database if needed. 017 * @param text 018 * @return 019 */ 020 Integer addText(String text); 021 022 }